problem insert data into mysql

From: Date: Sat, 16 Nov 2002 16:48:34 +0000
Subject: problem insert data into mysql
Groups: php.windows 
Request: Send a blank email to php-windows+get-16982@lists.php.net to get a copy of this message
I make this script. I have a problem, the data entered in the form wont insert into MYSQL, the database added new row but with blank database. Is there something wrong with the script? because i install phpnuke and i can added new data into mysql. Thanks, i need solve this problem A.S.A.P, with your kind help o PHP-er.... Thanks.. using PHP 4.2 Apache 1.3 ========================code=================== <form action="insert.php" method="post"> First Name: <input type="text" name="first"><br> Last Name: <input type="text" name="last"><br> Phone: <input type="text" name="phone"><br> Mobile: <input type="text" name="mobile"><br> Fax: <input type="text" name="fax"><br> E-mail: <input type="text" name="email"><br> Web: <input type="text" name="web"><br> <input type="Submit"> </form> <?PHP $username="root"; $password=""; $database="belajarPHP"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO contacts VALUES ('','$first','$last','$phone','$mobile','$fax','$email','$web')"; mysql_query($query); mysql_close(); ?>

« previous php.windows (#16982) next »