Hi, I'm trying to get password recognition calling data froma table
called users('user_nam e' and 'user_password' using the below (bottom
of page) code.
However, I get the following warning from my browser
"Parse error: parse error, unexpected ';' in /data/members/paid/g/l/
glastonburytv.e u/htdocs/www/check_password. php3 on line 19
This is the line I have replaced my password with "MY PASSWORD"
Now I'm using the same connectivity activater (see line below) in
other pages
mysql_connect(" localhost", "glastonburytv_ eu", "MYPASSWORD ")
Does anyone please have any ideas why I'm getting the error message on
the ";" (line 19)
(Full Code Below)
Thank You
--Sheik Ishmael
<html>
<head>
<title>Passwo rd Checking Script</title>
</head>
<body>
<?php
function print_form() {
?>
<form action="check_p assword.php3" method="POST">
<h3>Please Login</h3>
User Name: <input type="text" name="user_name ">
<br>Password: <input type="password" name="password" >
<input type="submit" name="submit" value="Login!">
</form>
<?
}
if(isset($submi t)):
if(!$$db = mysql_connect(" localhost", "glastonburytv_ eu",
"MYPASSWORD "));
print("<h1>Can' t Connect to the DB!</h1>\n");
else:
mysql_select_db ("glastonburytv _eu_1");
endif;
$sql = "select * from users where user_name = '$user_name'";
$result = mysql_query($sq l);
$row_count = mysql_num_rows( $result);
if($row_count == 0):
?>
<h3>Wrong User Name! Try Again</h3>
<?
print_form();
else:
$row = mysql_fetch_arr ay($result);
if($password != $row["user_passw ord"]):
?>
<h3>Incorrect Password! Try Again</h3>
<?
print_form();
else:
?>
<h3>Password Accepted!</h3>
<?
endif;
endif;
else:
print_form();
endif;
?>
</body>
</html>
called users('user_nam e' and 'user_password' using the below (bottom
of page) code.
However, I get the following warning from my browser
"Parse error: parse error, unexpected ';' in /data/members/paid/g/l/
glastonburytv.e u/htdocs/www/check_password. php3 on line 19
This is the line I have replaced my password with "MY PASSWORD"
Now I'm using the same connectivity activater (see line below) in
other pages
mysql_connect(" localhost", "glastonburytv_ eu", "MYPASSWORD ")
Does anyone please have any ideas why I'm getting the error message on
the ";" (line 19)
(Full Code Below)
Thank You
--Sheik Ishmael
<html>
<head>
<title>Passwo rd Checking Script</title>
</head>
<body>
<?php
function print_form() {
?>
<form action="check_p assword.php3" method="POST">
<h3>Please Login</h3>
User Name: <input type="text" name="user_name ">
<br>Password: <input type="password" name="password" >
<input type="submit" name="submit" value="Login!">
</form>
<?
}
if(isset($submi t)):
if(!$$db = mysql_connect(" localhost", "glastonburytv_ eu",
"MYPASSWORD "));
print("<h1>Can' t Connect to the DB!</h1>\n");
else:
mysql_select_db ("glastonburytv _eu_1");
endif;
$sql = "select * from users where user_name = '$user_name'";
$result = mysql_query($sq l);
$row_count = mysql_num_rows( $result);
if($row_count == 0):
?>
<h3>Wrong User Name! Try Again</h3>
<?
print_form();
else:
$row = mysql_fetch_arr ay($result);
if($password != $row["user_passw ord"]):
?>
<h3>Incorrect Password! Try Again</h3>
<?
print_form();
else:
?>
<h3>Password Accepted!</h3>
<?
endif;
endif;
else:
print_form();
endif;
?>
</body>
</html>
Comment