Jump to content


Photo

db submit error (i think lol)


  • Please log in to reply
2 replies to this topic

#1 whare

whare
  • Members
  • PipPipPip
  • Advanced Member
  • 75 posts

Posted 15 August 2006 - 04:52 PM

Hi All

I keep getting this error and i have tried other wass of sorting the problem but carnt seem to work it out

Any Ideas??

Parse error: parse error, unexpected T_STRING in /home/www/evtecsolutions.com/dashairways/pirep2/includes/pirep.php on line 23

Here is my code

<?
// Session and include info
session_start();
include 'config.php';
// Form Field info
$fltnum = $_POST['fltnum'];
$actype = $_POST['actype'];
$depair = $_POST['depair'];
$deptime = $_POST['deptime'];
$arair = $_POST['arair'];
$artime = $_POST['artime'];
$flttime = $_POST['flttime'];
$fltinfo = $_POST['fltinfo'];

$userid = $_SESSION['userid'];

// SQL to update the table "pirep"

$sql = mysql_query("INSERT INTO pirep (userid, fltnum, actype, depair, deptime, arair, artime, flttime, fltinfo, pirep_date)
        VALUES('$userid','$fltnum','$actype','$depair','$deptime','$arair','$artime','$flttime','$fltinfo', now())") 
        or die (mysql_error())
// SQL table to update "pilot" [this is the bit with the error
	mysql_query("UPDATE pilot SET lastpirep=now() WHERE userid='$userid'");
	echo "Thankyou for your Pirep.";


?>


Thanx All
Whare

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 15 August 2006 - 05:14 PM

For one, your missing the semicolon at the end of this line:

$sql = mysql_query("INSERT INTO pirep (userid, fltnum, actype, depair, deptime, arair, artime, flttime, fltinfo, pirep_date)
        VALUES('$userid','$fltnum','$actype','$depair','$deptime','$arair','$artime','$flttime','$fltinfo', now())") 
        or die (mysql_error())


#3 whare

whare
  • Members
  • PipPipPip
  • Advanced Member
  • 75 posts

Posted 15 August 2006 - 05:17 PM

It is amasing how easy it is to forget that lol

I will check it and see if it works lol




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users