RE: PHP Login 11-22-2013, 01:28 AM
#21
(11-22-2013, 12:40 AM)ImMe Wrote: I think you for the help, but my issue still isn't resolved. If you could PM me an instance of the working code that would be nice. (Thank you for remembering I'm new at coding, and to this site.)
@Slarek has told you what the problem is twice now. There are no semicolons
here:
Code:
echo 'You have successfully logged in'and here:
Code:
echo 'Incorrect sign in info'Also, here:
Code:
if(user == 'username' && pass == "password") {...
except that your form isnt a form. your form needs form tags that specifies that it is a form such as <form method=post action=script.php></form>
Also, I would say its a whole lot more efficient to only inject PHP code when its needed, as opposed to putting HTML in echo tags, such as:
Code:
Account ID:
<input type="text" name="user">
Password:
<input type="text" name="pass">
<?php
if(user == 'username' && pass == "password") {
echo 'You have successfully logged in'
} else {
echo 'Incorrect sign in info'
}
?>


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)