gesf
New member
You may need to use the superglobals array. I suggest you to always use them!
For you to know what i´m talking about, please read this post!
So try this code:
Make sure you read the 2nd link i´ve posted!
For you to know what i´m talking about, please read this post!
So try this code:
Code:
<?php
/* This first line is just to prevent the script to run everytime this file is called */
if(isset($_POST['submit'])){
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
// So in this case, this is what you nedd: $_POST
$query = "INSERT INTO contacts VALUES ('','" . $_POST['first'] . "','" . $_POST['last'] . "','" . $_POST['phone'] . "','" . $_POS['mobile'] . "','" . $_POST['fax'] . "','" . $_POST['email'] . "','" . $_POST['web'] . "')";
mysql_query($query);
mysql_close();
}
?>
Make sure you read the 2nd link i´ve posted!