0) { $ret_str="Your guestbook entry was successfully added."; } else { $ret_str = "Your guestbook entry was NOT successfully added."; } // Append success/failure message $gb_str .= "$ret_str
"; } ?> "; // While there are still results while($get_row = mysql_fetch_array($get_rs)) { $name = $get_row["gbName"]; $email = $get_row["gbEmail"]; $comment = $get_row["gbComment"]; $date = $get_row["gbDateAdded"]; if(!empty($name)) { // If name exists and email exists, link name to email if(!empty($email)) { $name="by $name"; } // If name does exist and email exists, link email to email } elseif (!empty($email)) { $name = "by $email"; // Else make name blank } else { $name = ""; } // Append to string we'll print later on $gb_str .= "
$comment

< posted on $date $name>


"; } // Free Result Memory mysql_free_result($get_rs); ?> Guestbook
Name
Email
Comment