here's my script:
$name=$_POST['name'];
$email=$_POST['email'];
$pass=$_POST['pass2'];
$year=$_POST['year'];
$month=$_POST['month'];
$day=$_POST['day'];
$skype=$_POST['skype'];
$yahoo=$_POST['yahoo'];
if ($name == "" || $email == "" || $pass == "") {
echo "Please fill in all the fields";
}
$username = "username";
$password = "password";
$host = "localhost";
mysql_connect($host,$username,$password) or die("No connect");
mysql_select_db("dbname") or die("Unable to select database");
$query = "INSERT INTO members VALUES
('','$name','$email','$pass','$year','$month','$day','$skype','$yahoo')";
mysql_query($query) or die(mysql_error());
$ok = "
okregistered";
if (mysql_query($query)) {
echo($ok);
}
else {
}
?>
2007-03-23
02:23:24
·
3 answers
·
asked by
alertcmail
2
in
Programming & Design