I was going across a tutorial on how to make a shoutbox and came across these code
<?php
include('chatter.php');
$q = "select * from chatterblock order by id desc ";
$result = mysql_query($q);
while ($row = mysql_fetch_array($result)) {
$id = $row["id"];
$name=$row["name"];
$url = $row["url"];
$msg = $row["msg"];
echo "<b>$name</b><br><a href=\"$url\" target=\"new\">Website</a><br>$msg<hr>";
}
?>
I was wondering if there was a way to make it so that
"if url is empty, then don't display"
Because for now at the shoutbox, even if you don't type anything in the [url]http://[/url] section, it will still show up. I've been looking for how to do it x.x" but maybe I'm not searching in the correct terms so..
Thanks in advance!