This is the code that I am working on. I am trying to add md5 encryption to the login code.
each time I try to run the code i get this error message. It is referring to the first if statementPHP Code:<?php
//Delcarle the variables
$User=$_GET['User'];
$passwd=($_GET['Password']);
$passwd=md5($_POST['Password'])
if(!isset($_GET['User']) && !isset($_GET['Password']))
{
?>
<h3>Please Logon</h3>
<form action="adminlogin.php" method="GET">
<table border="1">
<tr><th>UserID</th><td><input type="text" name="User"></td></tr>
<tr><th>Password</th><td><input type="password" name="Password"></td></tr><tr><td colspan=2 align="center"><input type="submit" value="login"></td></tr>
</table>
</form>
<?php
}
else
{
include ("connect.php");
$passwd=md5($passwd);
echo "$User>>>>>>>$passwd";
$query = "select * from users where User='$User' and password_md5='$passwd'";
$result=mysql_query($query) or die ("error in query");
if (mysql_num_rows($result)>0)
{
echo "<a href='system_management.php'>System Management</a>";
}
else
{
if(isset($User))
{
echo"Could not log you in.<br>";
}
}
}
?>
Parse error: syntax error, unexpected T_IF
I only know very little about what I am trying to do. I know I don't have IF in caps.
Please can someone help me out on this?
Vonz![]()







Bookmarks