|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am getting a parse error on line 7 of this code can anyone please tgell me what is wrong?
Thanks Tim <?php $conn = mysql_connect("localhost", "user", "pass"); if (!$res) { print mysql_error(); print "<pre>$ins</pre>" exit; } mysql_select_db("timesheets"); /* <-- Use correct DB name here */ /* Create SQL Insert statement */ $ins = "insert into paysheet ( employeename, address, city, state, country, employeenumber, socialsecurity, projectname, clientname, clientnumber, paystartday, payfinishday, totalhours, overtime_hours, accept)*/ values( '$employeename', '$address', '$city', '$state', '$country', '$employeenumber', '$socialsecurity', '$projectname', '$clientname', '$clientnumber', '$paystartday', '$payfinishday', '$totalhours', '$overtime_hours', '$accept')"; $res = mysql_query($ins, $conn); if (!$res) { print "Error inserting into database<br>"; print "<PRE>$ins</PRE>"; exit; } print "Thank you"; ?> |
|
#2
|
|||
|
|||
|
Hehe, aren't these frustrating sometimes?
The problem with PHP errors are that this particular error is in line 6 but it reports it in line 7 cause that's where the interpreter is when it figures out there's a problem. You need a semicolon at the end of your print statement on line 6. [This message has been edited by rod k (edited 12-06-99).] |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Can someone tell me what is wrong? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|