"Simple" if statement problem
Posted: Thu Jan 12, 2006 4:23 pm
Hi,
I've done the following if statement that checks the value of a student and then retrieves the corresponding row, all the field names are correct and are fine but it doesnt work...any ideas? the field type in the database is a varchar.
Thanks
- Rob
I've done the following if statement that checks the value of a student and then retrieves the corresponding row, all the field names are correct and are fine but it doesnt work...any ideas? the field type in the database is a varchar.
Thanks
- Rob
Code: Select all
<?php
if ($row_bookings['student_type'] == 'student'){
$bookingsum = $bookingsum + $row_bookings['student_price'];
}
if ($row_bookings['student_type'] == 'teacher'){
$bookingsum = $bookingsum + $row_bookings['teacher_price'];
}
if ($row_bookings['student_type'] == 'external'){
$bookingsum = $bookingsum + $row_bookings['external_price'];
}
?>