There aren't any closing quotes on your $message variable or semicolon to tell the parser that you're done with the assignment statement. -Micah On Mon, 2002-12-02 at 15:05, Chase wrote: > When trying to execute the following script to send the contents of a table > via "mail()" I am getting this error... > > Parse error: parse error, unexpected T_STRING in FILENAME.PHP on line 36 > > The portion of this code inside the HTML tags works great for displaying the > table on the screen, but when I include it in the larger script for sending > a mail message, I get this error. > > I am sure that it is something simple that I have been too stupid to catch, > but any help would be great! > > Chase > > > Code Follows ---> > > <? > $server = ""; > $user = ""; > $pass = ""; > $db = ""; > $table = ""; > ?> > > <? > $to = "CKnott <cknott@micsystems.com>" . ", " ; > $to .= "Chase <chase@ck2000.biz>"; > > $subject = "Price File Access History"; > > $message = ' > <html> > <head><title>Price File Access</title></head> > > <body> > <table border="1" align="center"> > <tr> > <td> > <div align="center"><b><i>Date / Time</i></b></div> > </td> > <td> > <div align="center"><i><b>Logged IP Address</b></i></div> > </td> > <td> > <div align="center"><i><b>Logged Username</b></i></div> > </td> > </tr> > > $link = mysql_connect("$server", "$user", "$pass"); > mysql_select_db("$db", $link); > > $result = mysql_query("SELECT * FROM $table ORDER BY 'view_date' > DESC",$link); > $num_rows = mysql_num_rows($result); > > if($num_rows) { > // print("<p><table border=1 align=center>"); > while($row = mysql_fetch_row($result)) > > { > > print("<tr>"); > print("<td>$row[0]</td>"); > print("<td>$row[1]</td>"); > print("<td>$row[2]</td>"); > print("</tr>"); > > > } > print("</table></p>"); > } else { > print("No Files To Show!!"); > > } > > </body> > </html> > '; > > $headers = "MIME-Version: 1.0\r\n"; > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; > > $headers .= "From: MIC Price File Monitor <cknott@micsystems.com>\r\n"; > > mail($to, $subject, $message, $headers); > > ?> > -- Raincross Technologies Development and Consulting Services http://www.raincross-tech.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php