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
edawson003
Forum Contributor
Posts: 133 Joined: Thu Aug 20, 2009 6:34 am
Location: Los Angeles, CA - USA
Post
by edawson003 » Wed Oct 14, 2009 10:53 pm
How can I get a $variable to pass thru a url set by php redirect code ($recordid for example)?
Code: Select all
$recordid = $_GET['fid'];
header( "Location: http://www.someurl.com/membersarea/edit.php" );
I want the url to actual work :
http://www.someurl.com/membersarea/edit.php?fid=117
Eric!
DevNet Resident
Posts: 1146 Joined: Sun Jun 14, 2009 3:13 pm
Post
by Eric! » Wed Oct 14, 2009 11:10 pm
I usually just redirect directly with the query data in the string.
Code: Select all
header('Location: http://www.someurl.com/membersarea/edit.php?fid='.$recordid);
edawson003
Forum Contributor
Posts: 133 Joined: Thu Aug 20, 2009 6:34 am
Location: Los Angeles, CA - USA
Post
by edawson003 » Wed Oct 14, 2009 11:54 pm
That works. Thx!