Field journal

".$res->dn_name."

php if(isset($_SERVER['QUERY_STRING'])) { if($_GET['act'] == 'show') { $q1=mysql_query("select * from dinolist where dn_id=".$_GET['id']); $res = mysql_fetch_object($q1); echo "<pName

"; echo "

English Name

".$res->english_nam."


"; echo "

Diet

".$res->Food."


"; echo "

Time

".$res->living_perd."


"; echo "

Size

".$res->lenth."


"; echo "

Fossilsite

".$res->fndng_plazs."


"; echo "

Info

".$res->des."


"; echo "

More Info Visit

".$res->url."


"; echo "

Back

"; } else if ($_GET['act'] == 'x') { view(); } else { view(); } } function view() { $query1=mysql_query("select distinct(suffix) from dinolist order by suffix"); while($result1=mysql_fetch_array($query1)) { $suffix= $result1["suffix"]; $query2=mysql_query("select * from dinolist where suffix='".$suffix."'"); echo "

Dinosaurs ".$suffix."


"; $num=mysql_num_rows($query2); $i=0; $count = 1; $itemsPerRow = ceil($num / 2.0); echo "
"; for ($j=0; $j<$num; $j++) { $cname=mysql_result($query2,$i,"dn_name"); $cid=mysql_result($query2,$i,"dn_id"); echo "".$cname."
"; if($count % $itemsPerRow == 0 && $count != $num) { echo "
"; } $count++; $i++; } echo "

"; } } ?>