OK I have been slapped , and using the help I got this error
"Duplicate entry 'BUSO203' for key 1"
$sql = "INSERT INTO subjects (unit_no, unit_name, result, sem, year) VALUES ('$_POST[unit_no]', '$_POST[unit_name]', '$_POST[result]', '$_POST[sem]', '$_POST[year]')";
Can anyone help
p.s. see previous post.
Thankyou
[SOLVED] Wrist slap - database insert
Moderator: General Moderators
-
papacharlie
- Forum Newbie
- Posts: 4
- Joined: Thu Feb 17, 2005 3:02 am
-
papacharlie
- Forum Newbie
- Posts: 4
- Joined: Thu Feb 17, 2005 3:02 am
I fixed the problem using phpdn recomended help site http://www.hudzilla.org
That problem was a duplicate entry in MySQL.
The major problem was fixed using
// If the submit button has been pressed
if (isset($_POST['unit_no'])) {
instead of
// If the submit button has been pressed
if (isset($_POST['submit])) {
That problem was a duplicate entry in MySQL.
The major problem was fixed using
// If the submit button has been pressed
if (isset($_POST['unit_no'])) {
instead of
// If the submit button has been pressed
if (isset($_POST['submit])) {