Parse Error with Insert Query – Newbie here so be gentle. :)
Thanks!
<?php
session_start();
include("../includes/includes.php");
$sql = "INSERT into price_details (courseid, 9holecostwkdy, 9holecostwknd, 18holecostwkdy, 18holecostwknd, cartfeewkdy, cartfeewknd, junior9holecostwkdy, junior9holecostwknd, junior18holecostwkdy, junior18holecostwknd, senior9holecostwkdy, senior9holecostwknd, senior18holecostwkdy, senior18holecostwknd, drivingrange)
VALUES (‘$POST_[courseid]‘, ‘$POST_[9holecostwkdy]‘, ‘$POST_[9holecostwknd]‘, ‘$POST_[18holecostwkdy]‘, ‘$POST_[18holecostwknd]‘, ‘$POST_[cartfeewkdy]‘, ‘$POST_[cartfeewknd]‘, ‘$POST_[junior9holecostwkdy]‘, ‘$POST_[junior9holecostwknd]‘, ‘$POST_[junior18holecostwkdy]‘, ‘$POST_[junior18holecostwknd]‘, ‘$POST_[senior9holecostwkdy]‘, ‘$POST_[senior9holecostwknd]‘, ‘$POST_[senior18holecostwkdy]‘, ‘$POST_[senior18holecostwknd]‘, ‘$POST_[drivingrange]‘)";
if (!mysql_query($sql))
{
die(‘Error: ‘ . mysql_error());
}
echo "Course ID: $_POST[courseid] pricing options have been added successfully. <a href=\"layout_submission_form.php?courseid=$_POST[courseid]\">Click here to add course layout details.</a>";
exit();
?>
ERROR MESSAGE:
Parse error: syntax error, unexpected T_STRING, expecting ‘]’ in /home/mngolf/public_html/data/courses/pricing_submission.php on line 8
View full post on Tycoon Talk
error, gentle., Here, insert, Newbie, parse, Query