title: inserting html multiple times into php
body: <p>I've got a html file (<a href="http://stateofdebate.html" rel="nofollow">thumbs up/thumbs down test page</a>) that executes two php files...one for the thumbs up, and one for the thumbs down.  </p>
  
  <p>What I need to do now is insert this code into the page (<a href="http://stateofdebate.com" rel="nofollow">State of Debate debate list</a>) so that each debate title can be ranked and move up and down accordingly.</p>
  
  <p>My friend, who I have been working with, has done most of the coding, both PHP and tables. </p>
  
  <p>My question is this: is there a way to get the thumbs up, thumbs down next to each debate title on the page? The best  I have gotten so far is getting all of the thumbs up/down above the table.</p>
  
  <pre><code>//test.html
  &lt;html&gt;
  &lt;body&gt;
  
  
  
  &lt;a href="upvote.php" onClick="alert('You have given this item a thumbs up! You can change          
  your vote, or leave it how it is.')"; onMouseOver="return changImage()" onMouseOut=  
  "return changImageBack()" &gt;&lt;img
  name="jsbutton2" src="Graphics/thumbs-up-unclicked.jpeg" width="75" height="75" border="0"
  alt="javascript button"&gt;&lt;/a&gt;
  
  &lt;script type="text/javascript"&gt;
  function changImage()
  {
  document.images["jsbutton2"].src= "Graphics/thumbs-up.jpeg";
  return true;
  }
  function changImageBack()
  {
   document.images["jsbutton2"].src = "Graphics/thumbs-up-unclicked.jpeg";
   return true;
  }
  &lt;/script&gt;
  
  
  &lt;a href="downvote.php" onClick="alert('You have given this item a thumbs down! You can change your vote, or leave it how it is.')"; onMouseOver="return changeImage()" onMouseOut= "return changeImageBack()" &gt;&lt;img
  name="jsbutton1" src="Graphics/thumbs-down-unclicked.jpeg" width="75" height="75" border="0"
  alt="javascript button"&gt;&lt;/a&gt;
  
  &lt;script type="text/javascript"&gt;
  function changeImage()
  {
  document.images["jsbutton1"].src= "Graphics/thumbs-down.jpeg";
  return true;
  }
  function changeImageBack()
  {
   document.images["jsbutton1"].src = "Graphics/thumbs-down-unclicked.jpeg";
   return true;
  }
  &lt;/script&gt;
  
  
  &lt;/body&gt;
      &lt;/html&gt;
  
  //upvote.php
  &lt;?php
  
  session_start();
  
  ?&gt;
  &lt;?php
  $server = "X"; 
  $dbusername = "X"; //database username 
  $dbpassword = "X"; //database password 
  $dbdatabase = "X"; //database name
  $sqlconnect = mysql_connect($server, $dbusername, $dbpassword) or die("Couldn't connect to SQL Server on $server");
  $sqldb = mysql_select_db($dbdatabase,$sqlconnect) or die("Couldn't open database $dbdatabase"); 
  
  
  $sql="INSERT INTO Votes (UID, date, rating)
  VALUES
  ('{$_SESSION['UID']}', CURDATE(), 1)";
  
  
  if (!mysql_query($sql,$sqlconnect))
    {
    die('Error: ' . mysql_error());
    }
  
  mysql_close($sqlconnect);
  ?&gt;
  </code></pre>