Hi, I'm new with php :o
and I have a problem with this code:
<!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</title>
</head>
<body>
<form method="POST" action="main.php">
Name: <input type="text" name="uname" /><br/>
Pass: <input type="password" name="upass" /><br/>
<input type="submit" value="send" />
</form>
</body>
</html>
<?
include("connect.php");
$uname = $_POST["uname"];
$upass = $_POST["upass"];
if(strlen($uname)<3&&strlen($uname)>10&&strlen($upass)<5)
echo ("check your input.");
else
{
$query = mysql_query("insert into ureg(uname, upass)
echo("registered successfully");
}
?>
the problem is that "registered successfully" appears on the page as I run it, and not after entering name and pass.
How can I fix it? 😕
Sorry, I didn't see there's a newbie forum, can you move the thread there?