Title

"; $comment="Comment

"; $username="username

"; $country="country varchar(16)

"; $address="address varchar (100)

"; $postal="postalcode varchar (100)

$biography=\"biography varchar (20)

"; $opt1="opt1 text

"; $opt2="opt2 text

"; $opt3="opt3 text

"; $opt4="opt4 text

"; $footer="

"; $pid = $_GET['pid']; $sql = 'SELECT `pid` '; $sql .= 'FROM `petdef` '; $sql .= 'WHERE 1 AND `pid` = 1 LIMIT 0, 30'; echo($header); mysql_connect("127.0.0.1", "root", "") or die ("error connecting to the MySQL Database");//connects and selects mysql_select_db("petition") or die("Error selecting database"); $result = mysql_query($sql); while($row=mysql_fetch_array($result, MYSQL_NUM)){ //$row = mysql_fetch_array($result); echo($row[7]."Hello"); if($row["comment"] != 0) { echo($comment); } if($row["username"] != 0) { echo($username); } if($row["country"]!=0) { echo($country); } if($row["address"]!=0) { echo($address); } if($row["postalcode"]!=0) { echo($postalcode); } if($row["biography"]!=0) { echo($biography); } if($row["opt1"] != 0) { echo($opt1); } if($row["opt2"] != 0) { echo($opt2); } if($row["opt3"] != 0) { echo($opt3); } if($row["opt4"] != 0) { echo($opt4); } echo($footer); } ?>