hii guys i am trying to sumit multiple forms in a single page like this.i am trying to alert yes when it come to jquery .but its not printing....plz help on this ?
Code:
<head>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".button1").click(function() {
$.post("useful.php",{ brand:$("#brand").val(),model:$("model").val(),id:$("#id").val(),check:$("#check").val() } ,function(data){
alert("yes");
// $("#change").html(data);
});
});
});
</script>
</head>
<?php
$sqlreview = "select * from mobile_user_reviews where property1 = '". $brand ."' and property2 = '". $model ."' ";
$resultreview = mysql_query($sqlreview);
if(mysql_num_rows($resultreview) > 0)
{
$myresult .= "<b>Reviews</b>";
$myresult .= "<ul>";
$j=1;
while($row = mysql_fetch_array($resultreview))
{
$myresult .= "<li>";
$myresult .= "<form name='' method='POST' action =''>";
$helpful = gettotalhelp ($row['id']);
$helpfulcount = gettotalhelpcount ($row['id']);
$myresult .= "<input type='hidden' id='id' name='id' value='".$row['id']."'>";
$myresult .= "<input type='hidden' id='model' name='model' value='".$model."'>";
$myresult .= "<input type='hidden' id='brand' name='brand' value='".$brand."'>";
$myresult .= "$helpfulcount of $helpful people found the following review helpful:<br/> ";
$myresult .= getuserrealname($row['userid']).' : '.$row['review'] .' , '.date("dS, F, Y h:i a",$row['reviewedon']);
$myresult .= "<br/>";
$myresult .= " Was this review helpful to you? <input type ='radio' id='check' name='check' value='Yes'> YES
<input type ='radio' id='check' name='check' value='No'>NO <input type='submit' name='submit' class='button".$j."' value='submit'>";
$myresult .= "<br/>";
$myresult .= "</form>";
$myresult .= "</li>";
$j++;
}
$myresult .= "</ul>";
}
}
echo $myresult;
?>
Comment