hi,
first I don't think you should use @ with mysql_fetch_array, control your mysql_query first, and there shouldn't be any error message with mysql_fetch_array. if it happens, it means something is wrong with PHP or something. moreover if you use @ in a loop, it won't display anything at all! no error message, no nothing 🙂
about link. first avoid echo to generate HTML it's 10 times better and easier to use ?><?PHP
echo "\n\t<td background=\"../../Gif/Background.gif\"><font color=\"black\" face=\"arial\"size=\"-6\" ><a href=\"$url\"> $row["street"] </a>" .
"</td>\n</tr>";
\n: doesn't mean anything, use HTML tags! <BR>... same for \t
</tr>: you forgot <tr>, no?
...: use ?><?PHP and <?= ?> to quickly display a PHP value
$url: where does it come from ? does $row ["url"] existin your table ? you said you wanted to use an url from your query so...
$row["street"]: use the . operator to separate the text from the variable. It's so hard to understand what you're trying to do!
here's a clean and neat version:
... PHP ...
?><td background="../../Gif/Background.gif"><font color="black" face="arial"size="-6" ><a href="<?= $row ["url"] ?>"><?= $row["street"]?></a></td></tr><?PHP
... PHP ...
benefits:
- easier to write, easier to read, easier to debug. separate the script (PHP code and variables) from the design (HTML)
- no more \ 🙂
- if you plain to use a WYSIWYG software then It will understand that code, note the one you used with echo. or It will do something wrong and stupid with it.
So if you want to generate a link in PHP, simply use the A HTML tag and <?=?> tags to display PHP values
JM