Jump to content

db submit error (i think lol)


whare

Recommended Posts

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

[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.";


?>
[/code]


Thanx All
Whare
Link to comment
Share on other sites

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

[code]$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())[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.