i installed phpmyadmin, mysql and activated the apache web server on my mac and can view my web pages fine as a localhost. What i am struggling with here is whenever i enter in details from my contact form, it doesn't update in the database.
contact form:
<Form Name="EnquiryForm" Method = "Post" Action = "contactprocess.php">
For further information please fill in the form below:
<p>
Name: <Input Type = "Text" Size="40" Name="Name">
<p>
Email Address: <Input Type = "Text" Size="40" Name="Emailaddress">
<p>
Contact Number: <Input Type = "Text" Size="40" Name="Contactnumber">
<p>
Description:<TextArea Rows="5" Cols="60" Name="Description">
</TextArea>
<p>
<Input Type = "Submit" name = "Submit" Value = "Submit">
<Input Type = "Reset" name = "Reset"Value = "Reset">
</Form>
php script to enter into database, contact process.php:
<?
session_start();
include('database.php');
//Define variables from form to put into table
$Name = $_POST['Name'];
$Emailaddress= $_POST['Emailaddress'];
$Contactnumber = $_POST['Contactnumber'];
$Description = $_POST['Description'];
$strEnquiryadd = "INSERT INTO enquiries VALUES
('','$Name','$Emailaddress','$Contactnumber','$Description');";
mysql_query($strEnquiryadd);
mysql_close();
$_SESSION['login'] = "1";
$_SESSION['userid'] = $userid;
header ("Location: contact us.php");
session_destroy();
?>