1. Open index.htm(l). Locate the div where you will be placing your received comments
  2. Copy the following code:

<?php
$conn = mysql_connect("localhost", "wetsoxor_student", "coyote");
mysql_select_db("wetsoxor_davinci", $conn);
$sql = "SELECT * FROM blog where user='david'";
$result = mysql_query($sql, $conn) or die(mysql_error());
while ($newArray = mysql_fetch_array($result)) {
$name = $newArray['name'];
$email = $newArray['email'];
$comment=$newArray['comment'];
$when=$newArray['when'];

print " On $when $name said: <br /> $comment<br />";
}
?>

  1. Switch to Code View
  2. Place the cursor where you want the comments to appear
  3. Paste the code
  4. Replace david in line 4 with your name
  5. Using Save As rename your document as index.php
  6. Upload the page and test the code.
$array[caption] "; } } else { print "No results."; } ?>
Home
$array[caption] "; } } else { print "No results."; } ?>
Classes
$array[caption] "; } } else { print "No results."; } ?>
Instructor
$array[caption] "; } } else { print "No results."; } ?>
Robotics