JimD Posted June 30, 2008 Share Posted June 30, 2008 function display_default() { echo "default page"; } function redirect_to() { header("Location: http://(*actuall URL is Here, just hidden for this forum*)/remodesk/user/$_values");} The part that sais $_values" doesnt work... i also tried many things like [username] still doesn't work. how can i get it to work... What i'm trying to do is when someone enters their username in a form from the this PHP file's Form, it will redirect to http://www.URLHERE.com/remodesk/users/ Username that the user entered into the form... so if i put Bob in the form i should be ridirected to http://URLHERE.com/remodesk/users/Bob Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/ Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 you can't have the name of the variable start with a underscore, change it to $values Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/#findComment-577967 Share on other sites More sharing options...
JimD Posted June 30, 2008 Author Share Posted June 30, 2008 after i change that it still only redirects me to .../remodesk/users/ i need there to be something after /users/ and that would be what the username is... Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/#findComment-577980 Share on other sites More sharing options...
Lamez Posted June 30, 2008 Share Posted June 30, 2008 try this: <?php header("Location: http://(*actuall URL is Here, just hidden for this forum*)/remodesk/user/".$_values); ?> Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/#findComment-577981 Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 or this: <?php header("Location: http://(*actuall URL is Here, just hidden for this forum*)/remodesk/user/".$values."/"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/#findComment-577983 Share on other sites More sharing options...
Lamez Posted June 30, 2008 Share Posted June 30, 2008 eww I hate slashes lol mine will give you user/bob his will give you user/bob/ lol either way Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/#findComment-577990 Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 user/bob/ will give you the directory of bob Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/#findComment-577996 Share on other sites More sharing options...
Lamez Posted June 30, 2008 Share Posted June 30, 2008 lol I just said that so will mine you just have a / at the end, mine does not. Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/#findComment-578000 Share on other sites More sharing options...
JimD Posted June 30, 2008 Author Share Posted June 30, 2008 Thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/112545-solved-this-redirect-code-wont-work/#findComment-578005 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.