Jump to content

Need Help: Else code


Cyan

Recommended Posts

Just new to this website and I keep getting several errors in my "else" code. I can't seem to find wrong codes in it (I'm just a rookie in programming) 

 

My codes is here:

<?php
$username = $_POST['username'];
$password = $_POST['password'];
if ($username == '12345' and $password == '12345');
{
 
echo 
'<h1> Welcome To The Site! </h1>
 <br>
 <br>
 <br>
 This site will let you post your ideas!
  <br>';
}
 
else
 
{
 
echo 'Wrong Username and Password';
 
}
 
?>
 
I keep having errors in bold text. Since I'm new at programming, I don't understand some errors that were shown to me in the actual site. The only error that I get is (T_ELSE) which I don't understand. So can someone help me what should I do with it since I'm just new. (I am also new to the site so I'm sorry if I did anything wrong)
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.