New to PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
baoky
Forum Newbie
Posts: 12
Joined: Sat May 24, 2008 6:21 am

New to PHP

Post 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
User avatar
aditya2071990
Forum Contributor
Posts: 106
Joined: Thu May 22, 2008 11:30 am
Location: Hyderabad, India
Contact:

Re: New to PHP

Post by aditya2071990 »

In myscript.php, place something like this:

Code: Select all

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