hi all, im having trouble with the insert statment i have. ive printed out the sql its making and its as below
CODE
insert into student & #40;enrolnumb,fname,lname,pass,email,telno,courseid,mod1id,mod2id,mod3id,mod4id,
dob) values ('00070165','daniel','newns',SHA('overmars1'),'didgy58@googlemail.com','07708755622','1','1','2','3','4','04/08/1982')
when i run that into phpmyadmin it inserts fine but when i try to do it with my php page it goes to the or die error message and shows the sql like i wanted it to
CODE
if (isset($_POST['submitted'])){
$fname=$_POST['fname'];
$sname=$_POST['lname'];
$enumb=$_POST['enumb'];
$pass=$_POST['pass'];
$email=$_POST['email'];
$telno=$_POST['telno'];
$dob=$_POST['dob'];
$courseid=$_POST['courseid'];
$mod1="1";
$mod2="2";//$_POST['mod2t'];
$mod3="3";//$_POST['mod3t'];
$mod4="4";//$_POST['mod4t'];
$sql="insert into student & #40;enrolnumb,fname,lname,pass,email,telno,courseid,mod1id,mod2id,mod3id,mod4id,
dob) values ('$enumb','$fname','$sname',SHA('$pass'),'$email','$telno','$courseid','$mod1','$mod2','$mod3','$mod4','$dob')";
mysql_query($sql) or die($sql);
not sure why is seems to run in the phpmyadmin but not in the actual php. if anybody has anyideas what have i missed out i bet its something really really stupid..
thanks for the help guys
dan.
for some unknow reason the cut and paste hasnt come across ok the opening bracket doesnt seem to have appeared but it is there on the print out for some strange reason there is a & #40 there instead, im using textedit to write the code then uploading to my site.