plz help......
<?
/*
// Part One - Initiate a mySQL Database Connection
// Database Connectivity Variables and other Variables
$DBhost = "localhost"; // Database Server
$DBuser = "nigolmvc_nigolmv"; // Database User
$DBpass = "babystuff"; // Database Pass
$DBName = "nigolmvc_nightspotz"; // Database Name
$table = "guestbook"; // Database Table
// Connect to mySQL Server
$DBConn = mysql_connect($DBhost,$DBuser,$DBpass) or die("Error in GuestBook Application: " . mysql_error());
// Select mySQL Database
mysql_select_db($DBName, $DBConn) or die("Error in GuestBook Application: " . mysql_error());
// Part Two - Choose what action to perform
//Assign contents of form to variables
$email = $_POST['email'];
mysql_query ( "INSERT INTO guestbook (email) VALUES ('$email');
echo mysql_error();
mysql_close();
?>For starters maybe an explaination of what is not working, errors you are getting etc.
By the way this should be in either the General, Newbies or Coding forums, PHP 5 isnt the place as it isnt exactly a PHP 5 issue by the looks of it.
Also in future please use the tagsFirst, try with the correct sintax:
mysql_query ( "INSERT INTO guestbook (email) VALUES ('$email')");
It happens all the time.
bb.
<?
/*
// Part One - Initiate a mySQL Database Connection
// Database Connectivity Variables and other Variables
$DBhost = "localhost"; // Database Server
$DBuser = "nigolmvc_nigolmv"; // Database User
$DBpass = "babystuff"; // Database Pass
$DBName = "nigolmvc_nightspotz"; // Database Name
$table = "guestbook"; // Database Table
// Connect to mySQL Server
$DBConn = mysql_connect($DBhost,$DBuser,$DBpass) or die("Error in GuestBook Application: " . mysql_error());
// Select mySQL Database
mysql_select_db($DBName, $DBConn) or die("Error in GuestBook Application: " . mysql_error());
// Part Two - Choose what action to perform
//Assign contents of form to variables
$email = $_POST['email'];
mysql_query ( "INSERT INTO guestbook (email) VALUES ('$email');
echo mysql_error();
mysql_close();
?>For starters maybe an explaination of what is not working, errors you are getting etc.
By the way this should be in either the General, Newbies or Coding forums, PHP 5 isnt the place as it isnt exactly a PHP 5 issue by the looks of it.
Also in future please use the tagsFirst, try with the correct sintax:
mysql_query ( "INSERT INTO guestbook (email) VALUES ('$email')");
It happens all the time.
bb.