Code Check
Posted: Fri Apr 02, 2004 8:26 pm
Using PHP and MySQL:
Here is the error:
Any ideas? Here is the page code just in case:
Here is the error:
My code reads this on line 24:Parse error: parse error, expecting `','' or `';'' in /home/httpd/vhosts/ticketblasters.com/httpdocs/econtrol/register/updateRegistration/_register.php on line 24
Code: Select all
$query = "UPDATE registration SET student_id = '$student_id', schedule_id = '$schedule_id', reason = '$reason' WHERE id = '$regID'"; $sql = mysql_query($query) or die("ERROR");Code: Select all
<?php
session_register();
include 'connect.php';
// Convert to simple variables
$student_id = $_POSTї'student_id'];
$schedule_id = $_POSTї'schedule_id'];
$first_name = $_POSTї'first_name'];
$last_name = $_POSTї'last_name'];
$location = $_POSTї'location'];
$month = $_POSTї'month'];
$day = $_POSTї'day'];
$year = $_POSTї'year'];
$time_in = $_POSTї'time_in'];
$fee = $_POSTї'fee'];
$email_address = $_POSTї'email_address'];
$locationNO = str_replace(" ","%20",$location);
$reason = $_POSTї'reason'];
$regID = $_POSTї'regID'];
echo $student_id; echo " "; echo $schedule_id; echo " "; echo $reason' echo " "; echo $regID; exit
// Enter info into the Database.
$query = "UPDATE registration SET student_id = '$student_id', schedule_id = '$schedule_id', reason = '$reason' WHERE id = '$regID'"; $sql = mysql_query($query) or die("ERROR");
if(!$query){
echo 'There has been an error registering your class. Please contact the webmaster.';
} else {
$id = mysql_insert_id();
$activatepath = "/schedule/_success.php?scheduleID=$schedule_id&studentID=$student_id";
// Let's mail the user!
$subject = "Class Registration at $sitename";
$message = "Dear $first_name $last_name,
You are now registered for a Ticket Blaster Defense Driving class on $month $day, $year at $location! Class begins promptly at $time_in. To save time and secure your registration, it is recommended that you prepay for the class online using most credit cards at PayPal.com. Click on the following link for payment details:
https://www.paypal.com/xclick/business=tilmon@ev1.net&item_name=TB%20REGISTRATION%20for%20$locationNO%20on%20$month,%20$day%20$year&item_number=$id&amount=$fee&no_note=1¤cy_code=USD
(OR copy/paste the address into your address bar). You can also call us and pay over the phone using a major credit card, 281-457-6700.
Thanks!
$sitename
http://www.ticketblasters.com
bs:281.457.6700
This is an automated response, please do not reply!";
mail($email_address, $subject, $message, "From: $sitename <$adminemail>\nX-Mailer: PHP/" . phpversion());
header('Location: _success_register.php'); ;
}
?>