You are here: Variables in stored txt « PHP « IT news, forums, messages
Variables in stored txt

Posted by Niels Riis Kristensen on 10/21/22 11:17

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация