[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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This is kunal Aggarwal.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>but till now i am not able to send the table in 
php.</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>"</FONT></DIV>
<DIV><STRONG><FONT color=#ff0000 face=Arial>&nbsp;print "&lt;table width=2000 
border=2&gt; \n";</FONT></STRONG></DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG><FONT color=#ff0000 face=Arial>&nbsp;print "&lt;tr 
style=\"background-color: #8fbc8f;\"&nbsp; bordercolor=\"#9966ff\"&gt;\n 
";<BR>&nbsp;&nbsp; for($i=0;$i&lt;(mysql_num_fields($result)-1) ;$i++) 
<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp; // retreiving the names of columns from the 
resultset<BR>&nbsp;&nbsp; &nbsp;&nbsp; print 
"&lt;th&gt;".strtoupper(mysql_field_name($result,$i))."&lt;/th&gt;";<BR>&nbsp;&nbsp; 
<BR>&nbsp;&nbsp; }<BR>&nbsp;&nbsp; <BR>&nbsp;print "&lt;th 
width=150&gt;Address&lt;/th&gt;";<BR>&nbsp; print "&lt;th 
width=150&gt;Followup&lt;/th&gt;";<BR>&nbsp;print "&lt;/tr&gt;\n";</FONT><FONT 
face=Arial></STRONG><FONT 
color=#ff0000><STRONG>&nbsp;&nbsp;<BR>&nbsp;&nbsp;while ($get_info = 
mysql_fetch_row($result))<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;{ &nbsp;print 
"&lt;tr&nbsp; bordercolor=\"#9966ff\" 
&gt;\n";<BR>&nbsp;&nbsp;for($i=0;$i&lt;(mysql_num_fields($result)-1) ;$i++) 
</STRONG></FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG><FONT color=#ff0000 face=Arial>//&nbsp;&nbsp;print "\t&lt;td 
style=\"background-color:#ffffcc;\" align=center&gt;&lt;font face=arial 
size=2/&gt;$field&lt;/font&gt;&lt;/td&gt;\n";</FONT></STRONG></DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG><FONT color=#ff0000 face=Arial>&nbsp;&nbsp;{<BR>&nbsp; 
<BR>&nbsp;print "\t&lt;td style=\"background-color:#ffffcc;\" 
align=center&gt;&lt;font face=arial 
size=2/&gt;$get_info[$i]&lt;/font&gt;&lt;/td&gt;\n";<BR>&nbsp; &nbsp; 
}&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;print "\t&lt;td 
style=\"background-color:#ccccff;\" align=center&gt;&lt;font face=arial 
size=2/&gt;&lt;/font&gt;\n";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
printf("&lt;img&nbsp;&nbsp; alt=\"");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result1 
= mysql_query(" SELECT address.* from address as address,enquiry_received&nbsp; 
AS enq where&nbsp; address.address_id=enq.address_id and 
enq.enquiry_id=$get_info[0]&nbsp;&nbsp; ") or die("SELECT Error: 
".mysql_error());<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 
$row1=mysql_fetch_row($result1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for($i=0;$i&lt;11;$i++)</FONT></STRONG></DIV>
 <DIV>&nbsp;</DIV>
<DIV><STRONG><FONT color=#ff0000 
face=Arial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$meta=mysql_fetch_field($result1, \
 $i);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;printf($meta-&gt;name.":".str_replace("%","",$row1[$i])."\n");<BR>& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</FONT></STRONG></DIV>
 <DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#ff0000 face=Arial><STRONG>"</STRONG></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>With Best Regards<BR>&nbsp;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;«·´`·.(*·.¸(`·.¸ ¸.·´)¸.·*).·´`·» <BR>«..Er. 
Kunal Aggarwal ..» <BR>«·´`·.(¸.·*(¸.·´ `·.¸)*·.¸).·´`·» <BR>&nbsp;<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