<form method="post" name="form" action="insert_user.php" onsubmit="return verifyIt(this);">
This file and the index.php are kept in the same directory. But the browser returns
I tried GET also, but not inserting the data to mysql db.
This is my insert_user.php
*--------------------------------- <html> <body> <? $sFName = AddSlashes( $_POST['first_name'] ); $sLName = AddSlashes( $_POST['last_name'] ); $sEMail = AddSlashes( $_POST['e_mail'] ); mysql_connect( "localhost", "dbuser", "dbpwd" ) or die( "Failure" ); mysql_select_db( "users" ); $query = "INSERT INTO users( fname, lname, email, comments ) VALUES ( '$sFName', '$sLName', '$sEMail', '$sComments' )"; $result = mysql_query( $query ) or die ( "Unable to insert user.." ); mysql_close( "users" ); header( "Location:index.php" ); ?> </body> </html> *------------------------------------------------------------
Thank you.
Sudheer
_________________________________________________________________
He's the fastest Indian.He's Narain Karthikeyan. http://server1.msn.co.in/sp03/tataracing/index.asp Will he make it to F1?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php