<form action="register.php" method="POST">
<input type="text" name="name" size="20">
<input type="text" name="email" size="20">
<input type="text" name="password" size="20">
<input type="text" name="country" size="20">
<input type="submit" name="submit" value="Submit">
</form>
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST' ){
$dbConnection = mysql_connect('localhost', 'root', NULL);
mysql_select_db('aa', $dbConnection);
mysql_query("INSERT INTO ".$qtable." (name, email, password, country) VALUES (".$_POST['name'].", '".$_POST['email']."',PASSWORD(".$_POST['password']."),".$POST['country']"')", $dbConnection);
$resource = mysql_query('SELECT * FROM qlist ORDER BY part ASC', $dbConnection);
$rows = mysql_num_rows($resource);
$result = NULL;
for ($i=0; $i<$rows; $i++) {
$row = mysql_fetch_object($resource);
$result = $row->name;
$result = $row->email;
$result = $row->password;
$result = $row->country;
}
print $result;
?>
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in c:\www\login\register.php on line 20
line 20:
mysql_query("INSERT INTO ".$qtable." (name, email, password, country) VALUES (".$POST['name'].", '".$POST['email']."',PASSWORD(".$_POST['password']."),".$POST['country']"')", $dbConnection);