Hi guys. I have no experience with AJAX at all; however, I understand that I need to use this as I want to be able to let a user click on a 'thumbs up' button to add to a like counter without reloading the page.

I would really appreciate some help on this issue. I am developing a business directory and everything so far works how it should apart from this issue. I have done some reading up and have coded the following:

<script type="text/javascript" src="prototype.js"></script>

			function sendRequest() {
				new Ajax.Request("test.php", 
					method: 'post', 
					postBody: '<?php $Company;?>'+$F('<?php $Company;?>')+'&amp;<?php $Code;?>='+$F('<?php $Code;?>')
					onComplete: showResponse 

			function showResponse(req){
				$('pr_likes').innerHTML= req.responseText;
<div class="pr_thumb">
        <?php $Code =  $sr[$ii]['postcode'];
         $Company = $sr[$ii]['company_name']; ?>
         <form id="test" onsubmit="return false;">
		<input type="hidden" name="<?php $Company;?>" id="<?php $Company;?>" >
                 <input type="hidden" name="<?php $Code;?>" id="<?php $Code;?>" >
                 <input type="submit" value="submit" onClick="sendRequest()">


// connect to the database
		mysql_connect("*****", "*****") or die(mysql_error()); 
		mysql_select_db("******") or die(mysql_error());
		mysql_query("UPDATE businesses SET number_likes = number_likes+1 WHERE company_name = '$companyName' AND postcode = '$postCode'");

I would greatly appreciate any help.

Kind regards,