Not sure where my issue is, please help!

I am making a new page. I copied information from a working page, and posted it into a new page, but the new page does not show the work correctly. Where the information is it should have a white background, but it only has a strip of white on the page. I’m not sure how to fix it or where the problem (if there is one) is. If anyone can help, I would be much obliged. Thank you!

Here is the code in my php page:

[code]

Ravenwood Farms

<?php

//connect

$dbh=mysql_connect ("******", “*", "”) or die (mysql_error());
mysql_select_db (“arcadias_phpb1”) or die (mysql_error());

Print " <h2 class=“title”> ";
Print $horseName;
Print "


<div class=“entry”> ";
$horseName = $_GET[‘horseName’];

$query = mysql_query(“SELECT * FROM horses WHERE horseName = ‘$horseName’”);
while($result = mysql_fetch_array($query)) {

$photo2 = $result['photo2'];
Print "<center><IMG SRC=\" ";
Print "$photo2"; 
Print "  \"\"></center><br>";


$photo2Credit = $result['photo2Credit'];
$photo2Link = $result['photo2Link'];    
Print "<center>";
Print "<a href=$photo2Link>$photo2Credit</a>";

    Print "</center><br>";    

Print " <table rules=“rows” width=“80%” border=“1” bordercolor="#DFDFDF" cellpadding=“5” cellspacing=“0” frame=“void”> ";
Print "

";
Print " Name ";
Print " ";

Print $horseName;
Print “

”;

Print"

Arcadia ID ";
$horseID = $result[‘horseID’];
Print $horseID;
Print " ";

Print"

Breed ";
$breed = $result[‘breed’];
Print $breed;
Print " ";

Print"

Gender ";
$gender = $result[‘gender’];
Print $gender;
Print " ";

Print"

Color ";
$color = $result[‘color’];
Print “$color”;
Print " - ";
$pattern = $result[‘pattern’];
Print $pattern;
Print " ";

Print"

Genetics ";
$genetics = $result[‘genetics’];
Print $genetics;
Print " ";

Print"

Year of Birth ";
$age = $result[‘age’];
Print $age;
Print " ";

Print"

Height ";
$height = $result[‘height’];
Print $height;
Print " hh ";

Print"

Breeder ";
$breeder = $result[‘breeder’];
$breederLink = $result[‘breederLink’];
Print “$breeder”;
Print " ";

Print"

Previous Owner(s) ";
$previousOwners = $result[‘previousOwners’];
Print $previousOwners;
Print " ";

Print"

Primary Discipline ";
$primaryDiscipline = $result[‘primaryDiscipline’];
Print $primaryDiscipline;
Print " ";

Print"

Total Winnings ";
$winningsTotal = $result[‘winningsTotal’];
Print “$”;
Print “$winningsTotal”;
Print " ";

Print "

Breeding Fee ";
Print “$”; $breedingFee = $result[‘breedingFee’];
Print $breedingFee;
Print " LFG ";

Print"

Registrations ";
$registrations = $result[‘registrations’];
Print $registrations;
Print " ";

Print"

 

";

$blurb1 = $result[‘blurb1’];
Print “$blurb1”;

Print "

Pedigree


<td rowspan=“2” align=“middle”>";

//Paternal Grand Sire

$PGS = $result[‘PGS’];

$query4 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$PGS’”);
$result4 = mysql_fetch_array( $query4 );
if (strlen($result4)>0)
{
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$PGS”>$PGS”;
}else{
Print $PGS;
}

Print"

                  <td align=\"middle\">";                

//Paternal Grand Sire’s Sire
$PGSS = $result[‘PGSS’];

$query5 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$PGSS’”);
$result5 = mysql_fetch_array( $query5 );
if (strlen($result5)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$PGSS”>$PGSS”;
}else{
Print $PGSS;
}

Print"

</tr
                  <td align=\"middle\">";

//Paternal Grand Sire’s Dam

$PGSD = $result[‘PGSD’];

$query6 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$PGSD’”);
$result6 = mysql_fetch_array( $query6 );
if (strlen($result6)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$PGSD”>$PGSD”;
}else{
Print $PGSD;
}

Print"

                <tr>
                  <td rowspan=\"2\" align=\"middle\">";

//Paternal Grand Dam
$PGD = $result[‘PGD’];

$query7 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$PGD’”);
$result7 = mysql_fetch_array( $query7 );
if(strlen($result7)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$PGD”>$PGD”;
}else{
Print $PGD;
}

Print"

                  <td align=\"middle\">";

//Paternal Grand Dam’s Sire
$PGDS = $result[‘PGDS’];

$query8 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$PGDS’”);
$result8 = mysql_fetch_array( $query8 );
if (strlen($result8)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$PGDS”>$PGDS”;
}else{
Print $PGDS;
}

Print"

                <tr>
                  <td rowspan=\"4\" align=\"middle\">

                    <p align=\"center\"><span class=\"subImage\">";

//Dam
$dam = $result[‘dam’];

$query10 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$dam’”);
$result10 = mysql_fetch_array( $query10 );
if (strlen($result10)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$dam”>$dam”;
}else{
Print $dam;
}

Print"

                </tr>
                <tr>
                  <td rowspan=\"2\" align=\"middle\">";

$MGD = $result[‘MGD’];

$query13 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$MGD’”);
$result13 = mysql_fetch_array( $query13 );
if (strlen($result13)>0)
{
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$MGD”>$MGD”;
}else{
Print $MGD;
}

Print"

                  <td align=\"middle\">";

$MGDS = $result[‘MGDS’];

$query14 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$MGDS’”);
$result14 = mysql_fetch_array( $query14 );
if (strlen($result14)>0)
{
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$MGDS”>$MGDS”;
}else{
Print $MGDS;
}

Print"

                <tr>
                  <td align=\"middle\">";

$MGDD = $result[‘MGDD’];

$query15 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$MGDD’”);
$result15 = mysql_fetch_array( $query15 );
if (strlen($result13)>0)
{
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$MGDD”>$MGDD”;
}else{
Print $MGDD;
}

Print"

                </tr>

              </tbody>
            </table>
";

}

Print"

Progeny

";

$queryX = mysql_query(“SELECT * FROM horses WHERE sire = ‘$horseName’ OR dam = ‘$horseName’”)or die (mysql_error());

while($resultX = mysql_fetch_array( $queryX ))
{

$nameResult = $resultX[‘horseName’];
$resultAge = $resultX[‘age’];

Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$nameResult”>$nameResult - $resultAge”;
Print “
”;

}

$queryXX = mysql_query(“SELECT * FROM horses WHERE sire = ‘$horseName’ OR dam = ‘$horseName’”)or die (mysql_error());
$resultXX = mysql_fetch_array($queryXX);

if(strlen($resultXX) > 0 ) {
Print “” ;
} else {
Print “
This horse currently has no progeny.


”;
}

$horseName = $_GET[‘horseName’];

$query = mysql_query(“SELECT * FROM horses WHERE horseName = ‘$horseName’”);
while($result = mysql_fetch_array($query)) {

$photo3 = $result['photo3'];
echo "<BR><BR><center><IMG SRC=\" ";
echo "$photo3"; 
echo "  \"\"><br>";

  $photo3Credit = $result['photo3Credit'];
$photo3Link = $result['photo3Link'];    
Print "<a href=$photo3Link>$photo3Credit</a><BR><BR>";    

$blurb2 = $result['blurb2'];

Print “$blurb2”; }

Print " ";

//$query2 = “SELECT * FROM show WHERE horseName = ‘$horseName’”;
//$query2 = mysql_query(“SELECT * FROM r_shows WHERE horseName = ‘$horseName’”);
Print"




Show Record

";

Print " <table width=“90%” cellpadding=“0” cellspacing=“1” summary="" border=“1”>

";

//$query2 = “SELECT * FROM show WHERE horseName = ‘$horseName’”;
$query2 = mysql_query(“SELECT * FROM r_shows WHERE horseName = ‘$horseName’”);
while($result2 = mysql_fetch_array($query2)) {
Print “

";

}
//If horse hasn’t been in a show

//$query3 = mysql_query(“SELECT * FROM show WHERE horseName = ‘$horseName’”);

//$result3 = mysql_fetch_array($query3);

//if(strlen($result3) < 1)
//{
// Print “
This horse has not yet been shown. Check back soon for updates!


” ;
//}

?>


 




 



 



Copyright 2013 Ravenwood Farms. All rights reserved. Design by FCT.
This is part of a game called Arcadia. None of this is real. For full copyright information please see disclaimer.

[/code]

** database info removed for security.

";

//Sire
$sire = $result[‘sire’];

$query3 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$sire’”);
$result3 = mysql_fetch_array( $query3 );
if (strlen($result3)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$sire”>$sire”;
}else{
Print $sire;
}

//Print “<a href=“http://arcadiasim.com/userhorsepoints.php?horseName=$sire”>$i”;

Print"



";

//Paterna Grand Dam’s Dam

$PGDD = $result[‘PGDD’];

$query9 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$PGDD’”);
$result9 = mysql_fetch_array( $query9 );
if(strlen($result9)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$PGDD”>$PGDD”;
}else{
Print $PGDD;
}

Print"

";

//Maternal Grand Sire
$MGS = $result[‘MGS’];

$query11 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$MGS’”);
$result11 = mysql_fetch_array( $query11 );
if (strlen($result11)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$MGS”>$MGS”;
}else{
Print $MGS;
}

Print"

";

//Maternal Grand Sire’s Sire
$MGSS = $result[‘MGSS’];

$query12 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$MGSS’”);
$result12 = mysql_fetch_array( $query12 );
if (strlen($result12)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$MGSS”>$MGSS”;
}else{
Print $MGSS;
}

Print"

";

//Materna lGrand Sire’s Dam
$MGSD = $result[‘MGSD’];

$query16 = mysql_query(“SELECT horseName FROM horses WHERE horseName = ‘$MGSD’”);
$result16 = mysql_fetch_array( $query16 );
if (strlen($result16)>0) {
Print “<a href=“http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=$MGSD”>$MGSD”;
}else{
Print $MGSD;
}

Print"

Date Show Name Class Name Place Score Winnings
” ;
$date = $result2[‘date’];
Print $date ;
Print"
";

$showName = $result2[‘showName’];
Print $showName ;
Print"

";

$className = $result2[‘className’];
Print $className ;
Print"

";

$place = $result2[‘place’];
Print $place ;
Print"

";

$score = $result2[‘score’];
Print $score ;
Print"

";

$classWinnings = $result2[‘classWinnings’];
Print “$”;
Print $classWinnings ;
Print"

Oops, sorry, not sure where the Edit button is, if there is one. Here is the URL to the page that is not working:

http://arcadiasim.com/RavenwoodFarms/2013/horse.php?horseName=Aly%20Is%20Game

The coding on this page is pretty bad, not the worst i’ve seen, but its up there. Not really sure why they’re using strlen() to check to see if a result was returned from a query when mysql_num_results() works better (and that’s what its inteded use is for).

You have html tags in the wrong place, good example is:



It should be



Apparently whatever is supposed to go there is missing. The whole page is like that, tables used but no information is in the.

The whole page could stand an overhaul to bring it up to standards. But aside from that, this is a html/css problem, possibly due to missing information and html tags being put in the wrong place. Could also be something missing in the css page.

Sponsor our Newsletter | Privacy Policy | Terms of Service