Page 1 of 1

New to PHP

Posted: Sat May 24, 2008 6:24 am
by baoky
I need some help with php coding

how do i create a simple php script that do the following

e.g I use

myscript.php?v=123abc

the myscript.php will load

http://therealaddress.com/page/whatever/123abc.html


Notice that 123abc is enter then the script capture the QueryString and use it to go to the real longer address. how do i do it?

anyone can show me the code or where to learn about it

Re: New to PHP

Posted: Sat May 24, 2008 1:03 pm
by aditya2071990
In myscript.php, place something like this:

Code: Select all

<?
$requestedpage=$_GET['v'];
header(location:$requestedpage);
?>