Okay, you just jumped WAY outside my basic knowledge...  However, it does
make perfect sense, so I am off to the library...

Chase


"Jim Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
In that case, your logic is not going to work. You have live PHP code inside
a string. You are going to need to build the $message in pieces. Start with
the HTML, then add the result from each itteration of your PHP loop to
$message then add the trailing HTML to form the complete $message.

Your close, but it's just not going to work like you think it will.

Jim


-------Original Message-------

From: Chase
Date: Monday, December 02, 2002 04:34:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Parse Error...

There is a single quote and semicolon on the line under </html> that I
thought would be defining the end of the assignment.
Should I have used double quotes instead of single?

Chase


"Micah Stevens" <[EMAIL PROTECTED]> wrote in message
1038870535.23725.123.camel@tyrell">news:1038870535.23725.123.camel@tyrell...
> 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 <[EMAIL PROTECTED]>" . ", " ;
> > $to .= "Chase <[EMAIL PROTECTED]>";
> >
> > $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 <[EMAIL PROTECTED]>\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

.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to