kir Posted March 7, 2014 Share Posted March 7, 2014 Please help, my php code is messed up..... The error is being generated on the first line. ----------------------------------------------------------------------------- if ($_POST['loginbtn']){ $user = $_POST['user'] $password = $_POST['password'] if ($user){ if ($password){ echo "$user - $password <hr /> $form"; } else echo "You must enter your password. $form"; } else echo "You must enter your username. $form"; } else echo $form; Quote Link to comment https://forums.phpfreaks.com/topic/286784-help-syntax-error-unexpected-t_enclapsed_and_whitespace/ Share on other sites More sharing options...
requinix Posted March 7, 2014 Share Posted March 7, 2014 What's the rest of the code before that? You've probably got an unclosed quote " earlier. Quote Link to comment https://forums.phpfreaks.com/topic/286784-help-syntax-error-unexpected-t_enclapsed_and_whitespace/#findComment-1471713 Share on other sites More sharing options...
Augury Posted March 7, 2014 Share Posted March 7, 2014 $user = $_POST['user'] $password = $_POST['password'] those lines need to be ended with ; Quote Link to comment https://forums.phpfreaks.com/topic/286784-help-syntax-error-unexpected-t_enclapsed_and_whitespace/#findComment-1471726 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.