Forum Moderators: coopster
Would the below code work if i close the php query or would it all need to be in one php query ?
e.g
<?php
include "dbaconnect.php" ;
$sql="SELECT * FROM country WHERE continentid='1'";
$result = mysql_query($sql);
while($rows = mysql_fetch_array( $result ))
{
if($rows == 0){
echo "No entries";
}
else{
while($row = mysql_fetch_array( $result ))
{
$continentid=$row["continentid"];
$countryid=$row["countryid"];
$cityid=$row["cityid"];
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title></title>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<link rel="stylesheet" type="text/css" href="./css/home-font.css"/>
<link rel="stylesheet" type="text/css" href="./css/home.css" />
<link rel="stylesheet" type="text/css" href="./css/footer.css" />
</head>
<body>
<div id="banner"><h1><? echo $countryid ; ?></h1></div>
<div id="leftcontent">