is it possible to manipulate vars here..

From: Date: Wed, 02 Aug 2006 18:04:44 +0000
Subject: is it possible to manipulate vars here..
Groups: php.general 
Request: Send a blank email to php-general+get-240013@lists.php.net to get a copy of this message
.. 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

« previous php.general (#240013) next »