I have a problem with mySQL database.
To start off, I'm a super N00b and am trying to make a web page using PHP and MySQL for a class project.
Currently the database and website are operational, using Apache2 and MySQL on a Ubuntu Server virtual machine. As of now I am trying to add information into the database using PHP. This is done using a webform. The code is as follows:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
error_reporting(E_ALL);
mysql_connect ("localhost", "client", "password") or (mysql_error());
mysql_select_db ("clientdata");
mysql_query ("INSERT INTO client (firstname, lastname, middlei, address1, Address2, city, state, zipcode, telephone, income, hearaboutus, needcomputer)VALUES ('$_POST[firstname]', '$_POST[lastname]', '$_POST[middlei]', '$_POST[address1]', '$_POST[Address2]', '$_POST[city]', '$_POST[state]', '$_POST[zipcode]', '$_POST[telephone]', '$_POST[income]', '$_POST[hearaboutus]', '$_POST[needcomputer]')");
print ("Thanks for submitting your information.");
echo " Click <a href='index.html'>here</a> to return to the home page.";
?>
</body>
</html>
Everything seems to work, and no errors are generated. I even look into the mysql.log file and it seems like the data entered into the web form has reached the server as the entered data shows up in the log. Upon opening the table with phpmyadmin however, no new entries have been added to the table? WTF! Any idea why this is happening?