All pastes #976541 Raw Edit

Mine

public text v1 · immutable
·published 2008-04-08 07:37 UTC
rendered paste body
  try(); {
 $q= $conn->insert('
                    into blog (
             						timestamp,
                              title,
                              entry,
                              author,
                              branch_id
   									            
                               )
             			values
						     (		
                       %s,  -- timestamp					     
						     %s,  -- title
                       %s, --  entry
                       %s, -- author
                       %s -- branch_id
                       
   
			          	)',
					       
					         $timestamp,
  								$title,
  								$entry,
 								$author,
   							$branch_id
   							                
                       );
}
 if (catch('SQLException', $e)) {

 echo "<table border=0 align=center width=100%>
        <tr>
        <td>";
 echo "<label><font color=red><b>ERRORS OCCURED...</label></font></b>";
 echo "<hr>"; 

 echo "<br>";
 
 echo "<label><img src=common/img/icons/i_error.gif border=0 align=absmiddle>&nbsp;&nbsp;Fill out the entire fields<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 echo "Check for Duplicate Entry";
 echo "<br>";
   echo $e->getMessage();
 echo "<br>";
 echo "</td>
        <td>";
 
 }
 else 
  {
  echo "<table border=0 align=center width=100%>
        <tr>
        <td>";
  echo "<label>OK <img src=common/img/icons/ok-small.png></label>";
  echo "<br>";
  echo  $title; echo"&nbsp;"; echo "Posted by:"; echo"&nbsp;"; echo $author;
  echo "<br>"; 
  echo "<label>News has successfully been added to database.";
  echo "<br>";
  echo "</td> <td>";
 }