Variables in stored txt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx)

NRK Group
- Electronic Music Engraving
- Webhosting
- Dynamic Web design
- E-Lists hosting

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux