hii guys,
i am working on a site where in guests can say whether the answer / review was useful for them ... there will be many review / answers in a single page .. so how to go on with yes/no for each answer/review ..i have donw ith some code.1st form works .the rest doesnot ..
if the code is not worth working on !!plzz tell me a way to work on it ...
i am working on a site where in guests can say whether the answer / review was useful for them ... there will be many review / answers in a single page .. so how to go on with yes/no for each answer/review ..i have donw ith some code.1st form works .the rest doesnot ..
Code:
$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>";
while($row = mysql_fetch_array($resultreview))
{
$myresult .= "<form name='useful' method = 'POST' action ='" .$_SERVER['PHP_SELF'] ."'>";
$helpful = gettotalhelp ($row['id']);
$helpfulcount = gettotalhelpcount ($row['id']);
$myresult .= "<input type='hidden' name='model' value='".$model."'>";
$myresult .= "<input type='hidden' name='brand' value='".$brand."'>";
$myresult .= "<li>";
$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='Yes' name='Yes' value='Yes'> YES
<input type ='radio' id='No' name='No' value='No'>NO <input type='submit' name='submit' value='submit'>";
$myresult .= "</li>";
$myresult .= "<br/>";
$myresult .= "</form>";
}
$myresult .= "</ul>";
if the code is not worth working on !!plzz tell me a way to work on it ...
Comment