jayeeta
01-13-2012, 05:32 AM
i got this error in my php page..while running the page..but i couldn't find out the mistake..can any one plz help me out of this situation?
here is the code...
<?php include("include/config.php"); ?>
<?php
if(!isset($_SESSION['uid']))
{
header("location:login_regis.php");
}
$qry_user="select * from `user_detail` where `email`='".$_SESSION['uid']."'";
$res_user=mysql_query($qry_user) or die(mysql_error());
$row_user=mysql_fetch_array($res_user);
$i="1";
$qry_order="select * from `transaction` where `tid`='".$_SESSION['tid']."'";
$res_order=mysql_query($qry_order) or die(mysql_error());
$row_order=mysql_fetch_array($res_order);
$qry_trans="select * from `trans_detail` where `tid`='".$_SESSION['tid']."'";
$res_trans=mysql_query($qry_trans) or die(mysql_error());
$transaction_id=$_SESSION['tid'];
$date=$_SESSION['date'];
$time=$_SESSION['time'];
$comment=$_SESSION['comment'];
$emailid=$row_user['email'];
$to_user=$emailid;
$to_owner="jayeeta.phoenix@gmail.com";
$sub_user="Order details in veenatandoori";
$sub_owner ="New order for veenatandoori";
$message="<table cellpadding='0' cellpadding='0' width='600px'>
<tr style='background-color:#FFCC00'>
<td colspan='4' align='center' style='padding:5px; color:#660000'>
Person Detail
</td>
</tr>
<tr>
<td>
Name:
</td>
<td>"
.$row_user['name'].
"</td>
<td>
Contact no.:
</td>
<td>"
.$row_user['mobile'].
"</td>
</tr>
<tr>
<td>
Email:
</td>
<td>"
.$emailid.
"</td>
<td>
Address:
</td>
<td>"
.$row_user['address'].
"</td>
</tr>"
"<tr style='background-color:#FFCC00'>
<td align='center' style='padding:5px; color:#660000'>
Order Detail
</td>
<td colspan='3' align='center' style='padding:5px; color:#660000'>
trans id:".$transaction_id."..i find the error over here
</td>
</tr>
<tr>
<td align='center'>
Name
</td>
<td align='center'>
Product Name
</td>
<td align='center'>
Quantity
</td>
<td align='center'>
Amount
</td>
</tr>"
while($row_trans=mysql_fetch_array($res_trans))
{
$message.= "<tr>
<td>"
.$i.
"</td>
<td>"
.substr($row_trans['product_name'],0,10).
"</td>
<td>"
.$row_trans['qty'].
"</td>
<td>"
.$row_trans['total'].
"</td>
</tr>"
$i++;
}
$message.= "<tr>
<td colspan='4'>
<hr />
</td>
</tr>
<tr>
<td colspan='3' align='center'>
Net Amount
</td>
<td align='center'>"
.$qry_order['net_amount'].
"</td>
</tr>
<tr style='background-color:#FFCC00'>
<td colspan='4' align='center' style='padding:5px; color:#660000'>
delivery Detail
</td>
<tr>
<td colspan='2' align='left'>
Date of delivery:
</td>
<td colspan='2' align='left'>"
.$date.
"</td>
</tr>
<tr>
<td colspan='2' align='left'>
Time of delivery:
</td>
<td colspan='2' align='left'>"
.$time.
"</td>
</tr>
<tr>
<td colspan='2' align='left'>
place of delivery:
</td>
<td colspan='2' align='left'>"
.$row_user['address'].
"</td>
</tr>
<tr>
<td colspan='2' align='left'>
Comment:
</td>
<td colspan='2' align='left'>"
.$comment.
"</td>
</tr>
</tr>
</table>";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: perfectspices.com' . "\r\n";
if(mail($to_user, $sub_user, $message, $headers) && mail($to_owner, $sub_owner, $message, $headers))
{
header("location:sendmail.php?msg=success");
}
else
{
header("location:sendmail.php?msg1=failure");
}
?>
here is the code...
<?php include("include/config.php"); ?>
<?php
if(!isset($_SESSION['uid']))
{
header("location:login_regis.php");
}
$qry_user="select * from `user_detail` where `email`='".$_SESSION['uid']."'";
$res_user=mysql_query($qry_user) or die(mysql_error());
$row_user=mysql_fetch_array($res_user);
$i="1";
$qry_order="select * from `transaction` where `tid`='".$_SESSION['tid']."'";
$res_order=mysql_query($qry_order) or die(mysql_error());
$row_order=mysql_fetch_array($res_order);
$qry_trans="select * from `trans_detail` where `tid`='".$_SESSION['tid']."'";
$res_trans=mysql_query($qry_trans) or die(mysql_error());
$transaction_id=$_SESSION['tid'];
$date=$_SESSION['date'];
$time=$_SESSION['time'];
$comment=$_SESSION['comment'];
$emailid=$row_user['email'];
$to_user=$emailid;
$to_owner="jayeeta.phoenix@gmail.com";
$sub_user="Order details in veenatandoori";
$sub_owner ="New order for veenatandoori";
$message="<table cellpadding='0' cellpadding='0' width='600px'>
<tr style='background-color:#FFCC00'>
<td colspan='4' align='center' style='padding:5px; color:#660000'>
Person Detail
</td>
</tr>
<tr>
<td>
Name:
</td>
<td>"
.$row_user['name'].
"</td>
<td>
Contact no.:
</td>
<td>"
.$row_user['mobile'].
"</td>
</tr>
<tr>
<td>
Email:
</td>
<td>"
.$emailid.
"</td>
<td>
Address:
</td>
<td>"
.$row_user['address'].
"</td>
</tr>"
"<tr style='background-color:#FFCC00'>
<td align='center' style='padding:5px; color:#660000'>
Order Detail
</td>
<td colspan='3' align='center' style='padding:5px; color:#660000'>
trans id:".$transaction_id."..i find the error over here
</td>
</tr>
<tr>
<td align='center'>
Name
</td>
<td align='center'>
Product Name
</td>
<td align='center'>
Quantity
</td>
<td align='center'>
Amount
</td>
</tr>"
while($row_trans=mysql_fetch_array($res_trans))
{
$message.= "<tr>
<td>"
.$i.
"</td>
<td>"
.substr($row_trans['product_name'],0,10).
"</td>
<td>"
.$row_trans['qty'].
"</td>
<td>"
.$row_trans['total'].
"</td>
</tr>"
$i++;
}
$message.= "<tr>
<td colspan='4'>
<hr />
</td>
</tr>
<tr>
<td colspan='3' align='center'>
Net Amount
</td>
<td align='center'>"
.$qry_order['net_amount'].
"</td>
</tr>
<tr style='background-color:#FFCC00'>
<td colspan='4' align='center' style='padding:5px; color:#660000'>
delivery Detail
</td>
<tr>
<td colspan='2' align='left'>
Date of delivery:
</td>
<td colspan='2' align='left'>"
.$date.
"</td>
</tr>
<tr>
<td colspan='2' align='left'>
Time of delivery:
</td>
<td colspan='2' align='left'>"
.$time.
"</td>
</tr>
<tr>
<td colspan='2' align='left'>
place of delivery:
</td>
<td colspan='2' align='left'>"
.$row_user['address'].
"</td>
</tr>
<tr>
<td colspan='2' align='left'>
Comment:
</td>
<td colspan='2' align='left'>"
.$comment.
"</td>
</tr>
</tr>
</table>";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: perfectspices.com' . "\r\n";
if(mail($to_user, $sub_user, $message, $headers) && mail($to_owner, $sub_owner, $message, $headers))
{
header("location:sendmail.php?msg=success");
}
else
{
header("location:sendmail.php?msg1=failure");
}
?>