Hi Folks.
I have a college assignment to do, deadline next week 4th January. It's a website linked to a MySQL database created in XAMPP. I'm using PHP to handle the data being passed from the webform but after three days of coding and recoding and Recoding and RECODING the PHP file, it is just not working! Not only is my database table remaining empty, but the PHP is not even responding with giving back error messages as to why things are not working!
I'm sorry to say it, long story, but the college has a lot to answer for with regards to the problems I'm experiencing. Despite having a PHP project land on my lap, the college did NOT teach PHP and I had to spend time and money in trying to learn it. It has NOT been fun, I'm not confident in my knowledge of the language, and I'm very annoyed at the college over this whole situation!
Since my PHP is not working, not even responding to tell me why it's not working, and time running out, I'm now trying to get help. Below are my two files:
Register.htm:
...
...
...
<form action="Insert.php" method="post">
<p>
<strong>Email Address:</strong><br />
<input type="text" name="email" /></p>
<p>
<strong>Password:</strong><br />
<input type="password" name="password" /></p>
<p>
<input type="button" name="register" value="Register" /></p>
</form>
...
Insert.php:
<?php
//Initiate the database.
$mysqli = new mysqli();
//Connect to the database.
$mysqli->connect("127.0.0.1","ofuser","ofpw");
//Select the Our Family database.
$mysqli->select_db("ourfamily");
//Insert the new information
mysql_query("INSERT INTO Login (Email_Address, Password)
VALUES (email, password)");
//Close the database.
mysql_close($mysqli);
?>
For some reason this does nothing at all!! A call for help to my fellow classmates saw one of them send me this new PHP code:
<?php
// replace your insert.php file with this
$error = 'Sorry but there seems to have been a problem connecting to our database!';
mysql_connect('localhost', 'ofuser', 'ofpw') or die($error);
$error = 'Sorry but there has been a problem connecting to our database!';
mysql_select_db('ourfamily')or die($error);
mysql_query("INSERT INTO `Login` (Email_Address, Password) VALUES (email, password)"); // I think this might be wrong. Usually when you send a value you need to put $ (dollar sign) before it. But try that anyway.
mysql_close();
?>
This, too, does NOTHING! With zero feedback as to what's going on and a deadline approaching, I need to try and get some answers. Does anyone here have any idea why this is not working??? Or at least give me some idea as to why the PHP doesn't even seem to respond with error messages telling me why it is not working??? It's totally infurating to code and recode over and over again, it not working, but getting no feedback as to WHY it's not working !!
Any input much appreciated.

