[insert_php]

$hostname=’localhost’;
$username=’israelicc’;
$password=’ShekelD0n@tions’;
$dbname=’info’;
mysql_connect($hostname,$username, $password);
mysql_select_db($dbname);

$sql=”INSERT INTO info (firstName, lastName, phoneNum, email, comments ) VALUES (‘”.$_POST[‘fname’]. “‘, ‘”. $_POST[‘lname’].”‘, ‘”. $_POST[‘phone’].”‘, ‘”.$_POST[’email’].”‘, ‘”.$_POST[‘comments’].”‘)”;
if(mysql_query($sql))
{
echo “added”;
}
else
{

}

[/insert_php]

Leave a Reply