Hi I have a little problem with this page
can you guys maybe help me please
parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\login.php on line 12
PHP Code:
<?php
require_once("dbConfig.php"); //database connection
// Catch field data
$username = $_POST['uname'];
$password = $_POST['pword'];
$submitted = $_POST['submitted'];
if ($username | $password)(
//////////////////////////////////
$query = sprintf("SELECT * FROM users_cb where uname ='$username' and pword = '$password'")
$result = @mysql_query($query);
$rowAccount = @mysql_fetch_array($result);
//////////////////////////////////
)
if ($rowAccount)(
echo "The record exists so you can enter ";
)elseif($submitted)(
echo "You dont exist in the system so your npt getting in!";
)
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" method="post" action="<?php $_SERVER['PHP_SELF'];?>">
<table width="200" border="2" align="center">
<tr>
<td>Username:</td>
<td><label>
<input name="uname" type="text" id="uname" maxlength="20" />
</label></td>
</tr>
<tr>
<td>Password</td>
<td><label>
<input type="text" name="pword" id="pword" />
</label></td>
</tr>
<tr>
<td colspan="2" align="center" valign="middle"><input name="submitted" type="hidden" id="submitted" value="1" />
<label>
<input type="submit" name="login" id="login" value="Login" />
</label></td>
</tr>
</table>
</form>
</body>
</html>
Comment