Rugbyfreak Posted May 20, 2009 Share Posted May 20, 2009 if (strlen($name) == 0 || strlen($familyname) == 0 || strlen($user) < 6 || strlen($password) < || !eregi('@',$email) { header('Location:fillfields.html'); } else { echo: "blabla"; } dooesn't work.... can someone help me.. just receiving a 404 error HTTP Error 404 Not Found Link to comment https://forums.phpfreaks.com/topic/158922-problem-with-form/ Share on other sites More sharing options...
CloudSex13 Posted May 20, 2009 Share Posted May 20, 2009 http://en.wikipedia.org/wiki/HTTP_404 Link to comment https://forums.phpfreaks.com/topic/158922-problem-with-form/#findComment-838158 Share on other sites More sharing options...
BobcatM Posted May 20, 2009 Share Posted May 20, 2009 Use the code tags to post your code, and post it all. Link to comment https://forums.phpfreaks.com/topic/158922-problem-with-form/#findComment-838165 Share on other sites More sharing options...
radi8 Posted May 20, 2009 Share Posted May 20, 2009 First of all, there is a syntax error: <?php if (strlen($name) == 0 || strlen($familyname) == 0 || strlen($user) < 6 || strlen($password) < || !eregi('@',$email)) { // header('Location:fillfields.html'); header("Location: ".$_SESSION['http'].$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."fillfields.html"); } else { echo: "blabla"; } ?> Link to comment https://forums.phpfreaks.com/topic/158922-problem-with-form/#findComment-838169 Share on other sites More sharing options...
Rugbyfreak Posted May 20, 2009 Author Share Posted May 20, 2009 why do you need to fill all these? i just want to redirect someone elsewhere(fillfields.html) if... can you explain why you add thos things? Link to comment https://forums.phpfreaks.com/topic/158922-problem-with-form/#findComment-838517 Share on other sites More sharing options...
Ken2k7 Posted May 21, 2009 Share Posted May 21, 2009 Other than the syntax error, try header('Location: /fillfields.html'); Link to comment https://forums.phpfreaks.com/topic/158922-problem-with-form/#findComment-838554 Share on other sites More sharing options...
MasterACE14 Posted May 21, 2009 Share Posted May 21, 2009 and change this... echo: "blabla"; to this... echo "blabla"; Link to comment https://forums.phpfreaks.com/topic/158922-problem-with-form/#findComment-838558 Share on other sites More sharing options...
Rugbyfreak Posted May 21, 2009 Author Share Posted May 21, 2009 if (strlen($name) == 0 || strlen($familyname) == 0 || strlen($user) < 6 || strlen($password) < || !eregi('@',$email)) Parse error: syntax error, unexpected T_BOOLEAN_OR what's wrong? getting crazy with small errors like '('. Link to comment https://forums.phpfreaks.com/topic/158922-problem-with-form/#findComment-838844 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.