Xasulfox Posted October 5, 2007 Share Posted October 5, 2007 Well, I have made some code of which doesn't work, it looks like it should and my friend has checked it too, yet we see no problem. ??? The form part goes: <form action="EP" method="post" name="f" class="style1" id="f"> <p>PASSWORD: <input name="pas" type="password" id="pas" /> </p> <p> <input name="sub" type="submit" id="sub" value="RUN" /> </p> </form> The php bit that gets the code goes: if(isset($_POST["pas"])) *not "field"* I only give the if bit *various secret codes and things below* It won't get past the if() unless I put a '!' infront of the isset. This gives me the impression that the variable hasn't been set, I've tried it on 3 different servers and no luck on any. Any help would be greatly accepted -Xasulfox Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/ Share on other sites More sharing options...
Aureole Posted October 5, 2007 Share Posted October 5, 2007 Why is the action EP, doesn't that need to be like form_processor.php it has to point to a file that processes the form? Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362687 Share on other sites More sharing options...
Xasulfox Posted October 5, 2007 Author Share Posted October 5, 2007 EP is the directory the php file is in, I've also tried it pointing to that file using the complete URL. No luck. I must have been on this problem for a good 5 hours now Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362690 Share on other sites More sharing options...
BlueSkyIS Posted October 5, 2007 Share Posted October 5, 2007 sounds silly, but is there a form field called field? if(isset($_POST["field"])) it should be if(isset($_POST["pas"])) Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362693 Share on other sites More sharing options...
Xasulfox Posted October 5, 2007 Author Share Posted October 5, 2007 ack, yeah, sorry, I'm using lots of different files all at once. It should say "pas". Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362698 Share on other sites More sharing options...
Aureole Posted October 5, 2007 Share Posted October 5, 2007 Ok put the form processing stuff in the file that the form is in then leave the action empty like action="" try that. Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362699 Share on other sites More sharing options...
Xasulfox Posted October 5, 2007 Author Share Posted October 5, 2007 Ok, give me a min Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362700 Share on other sites More sharing options...
BlueSkyIS Posted October 5, 2007 Share Posted October 5, 2007 Ok put the form processing stuff in the file that the form is in then leave the action empty like action="" try that. yeah good idea, that 'should' default to the POSTing page, but to make sure you might want to have the page directly reference itself, ala: action='<?=$_SERVER['PHP_SELF'];?>' Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362702 Share on other sites More sharing options...
Xasulfox Posted October 5, 2007 Author Share Posted October 5, 2007 I hate to say it but, its still not working Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362703 Share on other sites More sharing options...
MmmVomit Posted October 5, 2007 Share Posted October 5, 2007 The id attributes should probably be name attributes instead. Edit: wait, nm. They're already there. Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362704 Share on other sites More sharing options...
Xasulfox Posted October 5, 2007 Author Share Posted October 5, 2007 Its working now, I started over using all your ideas. -Thanks for everyone who helped Quote Link to comment https://forums.phpfreaks.com/topic/71997-solved-php-problem-with-no-problem/#findComment-362707 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.