MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 6th, 1999, 08:11 AM
tigertim
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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";

?>

Reply With Quote
  #2  
Old December 6th, 1999, 06:33 PM
rod k
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Can someone tell me what is wrong?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT