user login script problem
Posted: Sun Feb 14, 2010 12:03 am
<!doctype html public "-//w3c//dtd html 3.2//en">
<html>
<body background="querybackground.jpg">
<p> </p>
<p> </p>
<p> </p>
<p style="font-family:times; color:black; font-size:20px; text-align:center">CUSTOMER LOGIN</p>
<p style= text-align:"center">
<?php
function validateOnSubmit()
{
$errs= True;
if (strlen($Ctrid) < 6 || strlen($Ctrid) > 12 && $Ctrid != NULL)
{
$errs = False;
echo "alert('Please enter user id of length greater than or equal to 6 characters and less than or equal to 12 characters')";
}
if (strlen($pwd) < 6 || strlen($pwd) > 12 && $pwd != NULL)
{
$errs = False;
echo "alert('Please enter password of length greater than or equal to 6 characters and less than or equal to 12 characters')";
}
if ($Ctrid == NULL && $pwd == NULL)
{
$errs = False;
echo "alert('Please fill the required categories before submitting')";
}
return $errs;
}
echo "<form name="translation_login_input" onsubmit="return validateOnSubmit()" action="translationorder.htm" method="get">
<table>
<tr>
<td><p style="font-family:times; color:black; font-size:20px; text-align:center">Customer id</p></td>
<td><p style="font-family:times; color:black; font-size:20px; text-align:center">:</p></td>
<td><input $Ctrid type="text" name="Customerid" value="" size="20">
<br></td>
</tr>
<tr>
<td><p style="font-family:times; color:black; font-size:20px; text-align:center">Password</p></td>
<td><p style="font-family:times; color:black; font-size:20px; text-align:center">:</p></td>
<td><input $pwd type="password" name="Password" value="" size="20">
<br></td>
</tr>
</table>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</p>
<p style="font-family:times; color:black; font-size:20px; text-align:center">If you are a new customer, <a href="newcustomerlogin.htm">please follow this link...</a></p>
"
?>
</body>
</html>
NOTE: It shows the following error: "PHP Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in F:\Kandarp\testing\DEASICREATIONSWEBSITE\translationlogin.php on line 30 " PLEASE HELP
<html>
<body background="querybackground.jpg">
<p> </p>
<p> </p>
<p> </p>
<p style="font-family:times; color:black; font-size:20px; text-align:center">CUSTOMER LOGIN</p>
<p style= text-align:"center">
<?php
function validateOnSubmit()
{
$errs= True;
if (strlen($Ctrid) < 6 || strlen($Ctrid) > 12 && $Ctrid != NULL)
{
$errs = False;
echo "alert('Please enter user id of length greater than or equal to 6 characters and less than or equal to 12 characters')";
}
if (strlen($pwd) < 6 || strlen($pwd) > 12 && $pwd != NULL)
{
$errs = False;
echo "alert('Please enter password of length greater than or equal to 6 characters and less than or equal to 12 characters')";
}
if ($Ctrid == NULL && $pwd == NULL)
{
$errs = False;
echo "alert('Please fill the required categories before submitting')";
}
return $errs;
}
echo "<form name="translation_login_input" onsubmit="return validateOnSubmit()" action="translationorder.htm" method="get">
<table>
<tr>
<td><p style="font-family:times; color:black; font-size:20px; text-align:center">Customer id</p></td>
<td><p style="font-family:times; color:black; font-size:20px; text-align:center">:</p></td>
<td><input $Ctrid type="text" name="Customerid" value="" size="20">
<br></td>
</tr>
<tr>
<td><p style="font-family:times; color:black; font-size:20px; text-align:center">Password</p></td>
<td><p style="font-family:times; color:black; font-size:20px; text-align:center">:</p></td>
<td><input $pwd type="password" name="Password" value="" size="20">
<br></td>
</tr>
</table>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</p>
<p style="font-family:times; color:black; font-size:20px; text-align:center">If you are a new customer, <a href="newcustomerlogin.htm">please follow this link...</a></p>
"
?>
</body>
</html>
NOTE: It shows the following error: "PHP Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in F:\Kandarp\testing\DEASICREATIONSWEBSITE\translationlogin.php on line 30 " PLEASE HELP