here's my database structure
fname varchar(20)
lname varchar(20)
address varchar (20)
phone varchar(12)
email varchar(30)
major(30)
year varchar(15)
number smallint(4)
big varchar(40)
little varchar(40)
Those are all the fields i need in my table
So the problem is this. I created a form with each of these fields as inputs. Created the form processor to get the information to the database . So the information didn't go to the database. I then just tested to see if it would process to post the variables on a new page. It didn't then i fixed that part of the script. Next i added the connection script to see if it would connect to the database, it didn't and now it does cause i fixed it. So then i added the INSERT INTO table blah blah blah....Values blah blah and blah
and half the time it processes and half the time it doenst. However; when it does process, the database says it has a new record....but it doesn't
so here's the code for the form handler so far:
<?php
//require the connection script
require 'CONN.PHP';
//convert posts to simple variables
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$address= $_POST['address'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$major = $_POST['major'];
$year = $_POST['year'];
$number = $_POST['number'];
$big = $_POST['big'];
$little = $_POST['little'];
//now that we have that lets strip the slashes away so the databse likes it
$fname = stripslashes($fname);
$lname = stripslashes($lname;
$address= stripslashes($address);
$phone = stripslashes($phone);
$email = stripslashes($email);
$major = stripslashes($major);
$year = stripslashes($year);
$number = stripslashes($number);
$big = stripslashes($big);
$little = stripslashes($little);
mysql_query("INSERT INTO brothers(fname, lname, address, phone, email, major, number, big, little)
VALUES('$fname', '$lname', '$address', $phone', '$email', '$major', '$number', '$big', '$little')") or die (mysql_error());
?>