Variabels in stored txt

From: Date: Tue, 31 May 2005 18:45:16 +0000
Subject: Variabels in stored txt
Groups: php.general 
Request: Send a blank email to php-general+get-216088@lists.php.net to get a copy of this message
Hi. I have a problem that consist of a desire to use preformatted text in a while-loop while inserting data from another search. The code is as follows: ________________ $get_var1 = mysql_query("SELECT * FROM table1 WHERE id LIKE '1' LIMIT 1");
    while($record=mysql_fetch_assoc($get_var1))
        {
        $show_var = $record['text'];
        }
$result = mysql_query("SELECT * FROM table2 WHERE kind LIKE '20'");
    while($record=mysql_fetch_assoc($result))
        {
        echo "  <html>
                <head>
                <meta http-equiv='content-type' content='text/html;charset=iso-8859-1'>
                <title>test</title>
                </head>
                <body bgcolor='#ffffff'>
                    <table width='100%' border='0' cellspacing='2' cellpadding='0' height='50'>
                        <tr>
                            <td><img src='../../../Media/HMLogo.gif' alt='' height='40' width='147' border='0'></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </table>
                    <table width='100%' border='0' cellspacing='2' cellpadding='0'>
                        <tr height='526'>
                            <td width='100%' height='600'>
                            ".$show_var."
                            </td>
                        </tr>
                    </table>
                </body>
                </html>";
            print "
            <script type='text/javascript'>
            window.print();
            </script>";
        }
_________________ Needles to say, I hope, that it doesn't work! Niels Riis Kristensen (nrk@nrk-gruppen.dk) NRK Group - Electronic Music Engraving - Webhosting - Dynamic Web design - E-Lists hosting

Attachment: [application/pkcs7-signature] smime.p7s
« previous php.general (#216088) next »