Jump to content

Variables don't show correct data?!


jarv

Recommended Posts

$qry = "SELECT calendar_id, booking_total, booking_deposit, booking_tax, booking_status, payment_method, payment_option, customer_name, customer_email, customer_phone, customer_country, customer_city, customer_address, customer_zip, customer_notes, cc_type, cc_num, cc_exp, cc_code, txn_id, processed_on, created, appliance_make, appliance_model, appliance_serial, appliance_fault FROM aarbookts_booking_bookings WHERE id='$booking_id'";
$cur=mysql_query($qry);
while($i=mysql_fetch_row($cur))
{
$calendar_id=$i[0];
$booking_total=$i[1];
$booking_deposit=$i[2];
$booking_tax=$i[3];
$booking_status=$i[4];
$payment_method=$i[5];
$payment_option=$i[6];
$customer_name=$i[7];
$customer_email=$i[8];
$customer_phone=$i[9];
$customer_country=$i[10];
$customer_city=$i[11];
$customer_address=$i[12];
$customer_zip=substr($i[13], 0, strpos($i[13],' '));
$customer_notes=$i[14];
$cc_type=$i[15];
$cc_num=$i[16];
$cc_exp=$i[17];
$cc_code=$i[18];
$txn_id=$i[19];
$processed_on=$i[20];
$created=$i[21];
$appliance_make=$i[22];
$appliance_model=$i[23];
$appliance_serial=$i[24];
$appliance_fault=$i[25];
}


					echo '<h3>Booking made on: '.$created.'</h3>';
					echo '<p><strong>Customer Notes:</strong> '.$customer_notes.'<br /><br /> <strong>Booking Status:</strong> '.$booking_status.'<br /><br /></p>';

 

 

output is:

 

Booking made on: 2222207-26 23:50:54

 

Customer Notes: no

 

Booking Status: pppppng

 

and should be:

 

Booking made on: 2011-07-26 23:50:54

 

Customer Notes: no

 

Booking Status: pending

Link to comment
https://forums.phpfreaks.com/topic/242946-variables-dont-show-correct-data/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.