[prev in list] [next in list] [prev in thread] [next in thread]
List: phpdoc
Subject: [PHP-DOC] Help needed
From: "kunal" <softengg () iclcl ! com>
Date: 2004-09-29 7:17:12
Message-ID: 001301c4a5f2$ac1013e0$1700a8c0 () ibg
[Download RAW message or body]
Hello friends,
This is kunal Aggarwal.
Friends i am facing some problem in sending php script by
mail function.
I have to send a table dynamically created in php using "print" tags
but till now i am not able to send the table in php.
please help me if anyone have any idea in this regard.
I am using php script for table is
"
print "<table width=2000 border=2> \n";
print "<tr style=\"background-color: #8fbc8f;\" bordercolor=\"#9966ff\">\n ";
for($i=0;$i<(mysql_num_fields($result)-1) ;$i++)
{
// retreiving the names of columns from the resultset
print "<th>".strtoupper(mysql_field_name($result,$i))."</th>";
}
print "<th width=150>Address</th>";
print "<th width=150>Followup</th>";
print "</tr>\n";
while ($get_info = mysql_fetch_row($result))
{ print "<tr bordercolor=\"#9966ff\" >\n";
for($i=0;$i<(mysql_num_fields($result)-1) ;$i++)
// print "\t<td style=\"background-color:#ffffcc;\" align=center><font face=arial \
size=2/>$field</font></td>\n";
{
print "\t<td style=\"background-color:#ffffcc;\" align=center><font face=arial \
size=2/>$get_info[$i]</font></td>\n"; }
print "\t<td style=\"background-color:#ccccff;\" align=center><font face=arial \
size=2/></font>\n"; printf("<img alt=\"");
$result1 = mysql_query(" SELECT address.* from address as \
address,enquiry_received AS enq where address.address_id=enq.address_id and \
enq.enquiry_id=$get_info[0] ") or die("SELECT Error: ".mysql_error()); \
$row1=mysql_fetch_row($result1);
for($i=0;$i<11;$i++)
{
$meta=mysql_fetch_field($result1, $i);
printf($meta->name.":".str_replace("%","",$row1[$i])."\n");
}
"
With Best Regards
«·´`·.(*·.¸(`·.¸ ¸.·´)¸.·*).·´`·»
«..Er. Kunal Aggarwal ..»
«·´`·.(¸.·*(¸.·´ `·.¸)*·.¸).·´`·»
Software Engineer
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello friends,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>This is kunal Aggarwal.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Friends i am facing some problem in sending php
script by </FONT></DIV>
<DIV><FONT face=Arial size=2>mail function.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have to send a table dynamically created in php
using <STRONG>"print" </STRONG>tags</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>but till now i am not able to send the table in
php.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>please help me if anyone have any idea in this
regard.</FONT></DIV>
<DIV><FONT face=Arial size=2>I am using php script for table is </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>"</FONT></DIV>
<DIV><STRONG><FONT color=#ff0000 face=Arial> print "<table width=2000
border=2> \n";</FONT></STRONG></DIV>
<DIV> </DIV>
<DIV><STRONG><FONT color=#ff0000 face=Arial> print "<tr
style=\"background-color: #8fbc8f;\" bordercolor=\"#9966ff\">\n
";<BR> for($i=0;$i<(mysql_num_fields($result)-1) ;$i++)
<BR> {<BR> // retreiving the names of columns from the
resultset<BR> print
"<th>".strtoupper(mysql_field_name($result,$i))."</th>";<BR>
<BR> }<BR> <BR> print "<th
width=150>Address</th>";<BR> print "<th
width=150>Followup</th>";<BR> print "</tr>\n";</FONT><FONT
face=Arial></STRONG><FONT
color=#ff0000><STRONG> <BR> while ($get_info =
mysql_fetch_row($result))<BR> <BR> { print
"<tr bordercolor=\"#9966ff\"
>\n";<BR> for($i=0;$i<(mysql_num_fields($result)-1) ;$i++)
</STRONG></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><STRONG><FONT color=#ff0000 face=Arial>// print "\t<td
style=\"background-color:#ffffcc;\" align=center><font face=arial
size=2/>$field</font></td>\n";</FONT></STRONG></DIV>
<DIV> </DIV>
<DIV><STRONG><FONT color=#ff0000 face=Arial> {<BR>
<BR> print "\t<td style=\"background-color:#ffffcc;\"
align=center><font face=arial
size=2/>$get_info[$i]</font></td>\n";<BR>
} <BR> print "\t<td
style=\"background-color:#ccccff;\" align=center><font face=arial
size=2/></font>\n";<BR>
printf("<img alt=\"");<BR> $result1
= mysql_query(" SELECT address.* from address as address,enquiry_received
AS enq where address.address_id=enq.address_id and
enq.enquiry_id=$get_info[0] ") or die("SELECT Error:
".mysql_error());<BR>
$row1=mysql_fetch_row($result1);<BR> <BR>
for($i=0;$i<11;$i++)</FONT></STRONG></DIV>
<DIV> </DIV>
<DIV><STRONG><FONT color=#ff0000
face=Arial> &nb \
sp; {<BR> \
<BR> $meta=mysql_fetch_field($result1, \
$i);<BR>   \
; printf($meta->name.":".str_replace("%","",$row1[$i])."\n");<BR>& \
nbsp; }</FONT></STRONG></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT color=#ff0000 face=Arial><STRONG>"</STRONG></FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>With Best Regards<BR> </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> «·´`·.(*·.¸(`·.¸ ¸.·´)¸.·*).·´`·» <BR>«..Er.
Kunal Aggarwal ..» <BR>«·´`·.(¸.·*(¸.·´ `·.¸)*·.¸).·´`·» <BR> <BR>Software
Engineer <BR> </FONT></DIV></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic