is it possible to manipulate vars here..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



.. to build a url like http://devil.server.com/vitims_page.php??


// a,b,c,d are coming from a form
// and are defined in a dropdown of the form
// there are no form fields which can be filled by the user

// a maybe Germany, England ....
// b maybe Support, Training ....


// register_globals = on


function build_url(a,b,c,d) {

	$urlpart[a] = "parta";
	// $urlpart["Germany"] = "Stuttgart";

	$urlpart[b] = "partb";
	$urlpart[c] = "partc";
	$urlpart[d] = "partd";
	
	$url = "";

	if($a!="") $url.= $url+$urlpart[a];
	if($b!="") $url.= $url+$urlpart[b];
	if($c!="") $url.= $url+$urlpart[c];
	if($d!="") $url.= $url+$urlpart[d];

	return $url;
}

	$link = build_url($a,$b,$c,$d);

	echo $link;


-- 
Jochen Kaechelin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux