Parse error: syntax error, unexpected T_STRING in Z:\home\localhost\www\reg\reg.php on line 27
Вот 27 строка:
$query = mysql_query("INSERT INTO users VALUES('','$region','$name','$passwd')")or die(mysql error());[php]
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Регистрация</title>
</head>
<body>
<?php
$db = mysql_connect('localhost','users','') or die (mysql_error());
mysql_select_db('users',$db);
$submit = $_POST['submit'];
if(isset($submit))
{
$region = $_POST['region'];
$name = $_POST['name'];
$passwd = $_POST['passwd'];
$r_passwd = $_POST['r_passwd'];
}
if($passwd == $r_passwd)
{
$passwd = md5($passwd);
$query = mysql_query("INSERT INTO users VALUES('','$region','$name','$passwd')")or die(mysql error());
}
else
{
echo "Пароль или Логин введен не верно!"
}
?>
<form action="reg.php" method="post">
<div align="left">Город:<br>
<input name="region" type="text" size="8" maxlength="25" />
<br>
Имя:<br>
<input name="name" type="text" size="8" maxlength="14" />
<br>
Пароль:<br>
<input name="passwd" type="password" size="8" maxlength="24" /><br>Пароль:
<br><input name="r_passwd" type="password" size="8" maxlength="24" />
<br>
<br>
<input name="submit" type="submit" value="Регистрация" />
</div>
</form>
</body>
</html>