Dec 19, 2001 #1 Guest_imported New member Joined Jan 1, 1970 Messages 0 How do I make a query like index.php?action=main, that way i can redirect them into different places depending on the action query.
How do I make a query like index.php?action=main, that way i can redirect them into different places depending on the action query.
Dec 19, 2001 #2 AnakinPt Programmer Joined Mar 29, 2001 Messages 583 Location PT simple ... with a switch switch ($action){ case 1 : Header("Location: URL1" break; case 2 : Header("Location: URL2" break; ... default: Header("Location: URL_Default" break; } Anikin Hugo Alexandre Dias Web-Programmer anikin_jedi@hotmail.com Upvote 0 Downvote
simple ... with a switch switch ($action){ case 1 : Header("Location: URL1" break; case 2 : Header("Location: URL2" break; ... default: Header("Location: URL_Default" break; } Anikin Hugo Alexandre Dias Web-Programmer anikin_jedi@hotmail.com
Dec 19, 2001 #3 nabilf Programmer Joined Jul 23, 2001 Messages 7 Location LB you can take the result into a script where u test the $action variable and depending on this, u redirect to the appropriate page redirect.php <?php switch ($action){ case someaction: header("location:http://www.yourdomain.com/someaction.php " break; case anotheraction: header("location:http://www.yourdomain.anotheraction.php " break; . . . default: header("location:http://www.yourdomain.com/defaultaction.php " } ?> Upvote 0 Downvote
you can take the result into a script where u test the $action variable and depending on this, u redirect to the appropriate page redirect.php <?php switch ($action){ case someaction: header("location:http://www.yourdomain.com/someaction.php " break; case anotheraction: header("location:http://www.yourdomain.anotheraction.php " break; . . . default: header("location:http://www.yourdomain.com/defaultaction.php " } ?>
Dec 19, 2001 Thread starter #4 Guest_imported New member Joined Jan 1, 1970 Messages 0 Thank you so much Upvote 0 Downvote