Can someone please help me and tell me why this doesn’t work
[CODE]
<?php
session_start();
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<?php
$didithit = $_SESSION[‘didithit’];
echo $didithit
?>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Register</title>
<script type=”text/javascript”>
var didithit = “<?= $didithit ?>”;
<!–
function return checkscript()
{
didithit==1)
{
alert(‘Thank you’);
return true;
}
else
didithit==2)
{
alert(‘**** you’);
return false;
}
else
{
alert(‘****’);
return false;
}
}
//–>
</script>
</head>
<body>
<form name=’Register’form action=”controls/register/adduser.php” method=”post” onsubmit=”return checkscript()”>
<p>Enter a username and password to register.<br />
<table width=”409″ border=”0″>
<tr>
<td width=”130″>Username</td>
<td width=”8″>:</td>
<td width=”249″><input type=”text” name=”username” /></td>
</tr>
<tr>
<td>Password</td>
<td>:</td>
<td><input type=”password” name=”password” /></td>
</tr>
<tr>
<td>Confirm Password</td>
<td>:</td>
<td><input type=”password” name=”password2″/></td>
</tr>
<tr>
<td>Email Address</td>
<td>:</td>
<td><input type=”text” name=”email” /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<br /><br />
<input type=”submit” name=”submit” value=”Register” />
<p>
<p><br />
<br />
</form>
</body>
</html>
Thanks in advance