lonewolf217 Posted July 21, 2008 Share Posted July 21, 2008 I am trying to redirect a form to itself for error checking before submission. I have used some examples that I found in a search on these forums, but i dont think its working properly <form name="form" method="post" action="<?php $_SERVER['PHP_SELF']."?action=submit" ?>"> is there anything obviously wrong with this ? when I hit the submit button, the URL does not change to <url>?action=submit Link to comment https://forums.phpfreaks.com/topic/115861-solved-need-help-with-php_self-form-action/ Share on other sites More sharing options...
kenrbnsn Posted July 21, 2008 Share Posted July 21, 2008 Try <form name="form" method="post" action="?action=submit"> If you really want to use what you had, you need to echo the value: <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']."?action=submit" ?>"> Ken Link to comment https://forums.phpfreaks.com/topic/115861-solved-need-help-with-php_self-form-action/#findComment-595637 Share on other sites More sharing options...
lonewolf217 Posted July 21, 2008 Author Share Posted July 21, 2008 its always the stupid things that get you .... Thanks for the help that fixed it Link to comment https://forums.phpfreaks.com/topic/115861-solved-need-help-with-php_self-form-action/#findComment-595639 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.