Hi Guys,
i've created a simple form which should allow me to submit 'module' information into a module_table within myql via a HTML form.
When ive completed a form, and clicked on SUBMIT, the page comes back at me that everthing was succesful.
When i then view the contents of the module_table using "select*from module_table", absolutely no entries are there.
I have had success using the same method to submit 'student' information to the student_table in the same datbase using the same code, just changing the variable names. Why shouldnt the module submission work for me??
Thanks for all your help guys.
here's the contents of the HTML submission form
<h2>Add A Module</h2>
<form method=post action="create_module_entry.php">
<b>Module ID:</b>
<input type=text size=4 name=module_id>
<br>
<b>Lecturer ID:</b>
<input type=text size=4 name=lecturer_id>
<br>
<b>Course Title:</b>
<input type=text size=50 name=course_title>
<br>
<input type=submit name=submit value="Submit">
<input type=reset name=reset value="Clear">
</form>
Here is the "create_module_entry.php"
<?php include("dbconnect.php"); ?>
<?php
$query = "insert into module_table "
." (module_id, lecturer_id, course_title) values "
."('$module_id', '$lecturer_id', '$course_title')"
;
mysql_query($query);
?>
<h2>Module Submission Succesful</h2>
<h2><a href="module.php">Click to go back</a></h2>
Here is my dbconnect
<?php
$db = mysql_connect("aonifade02", "root", "");
mysql_select_db("sis", $db) or die(mysql_errno() . ": " . mysql_error() . "<br>");
?>