below is code that displays a cecK box next to each item found. I’m trying to write code that will allow the user to select all that apply and click the submit button and update the table next to the correct entry in the table
I’m having hard time getting it to work. any help is great
[code=php]
// updateTABLE
$update_buddy = mysql_query(“UPDATE buddylink SET status= ‘$status’, relative = ‘$relatives’ WHERE buddy_id = ‘$id'”)or die (“Link Create Error:” .mysql_error());
}
$last_login = $_REQUEST[‘last_login’];
$query = (“SELECT * FROM users WHERE user_id = ‘$user_id'”) or die .mysql_error();
$result=mysql_query($query)or die(“Get Search results Error: “.mysql_error());
while($r=mysql_fetch_assoc($result)) {
$last_login = $r[‘last_login’];
}
[code=php]
<?php
$get_buddy_request = (“SELECT * FROM buddylink WHERE buddy_id = ‘$user_id’ AND status = ‘1’”);
$buddy_request=mysql_query($get_buddy_request)or die(“get_buddy_request Search results Error: “.mysql_error());
while($row_buddy_request = mysql_fetch_assoc($buddy_request)){
$requester_id = $row_buddy_request[‘owner_id’];
$get_buddy_request_info = (“SELECT * FROM users WHERE user_id = ‘$requester_id'”);
$buddy_request_info = mysql_query($get_buddy_request_info)or die(“get_buddy_request_info Search results Error: “.mysql_error());
while($row_buddy_request_info = mysql_fetch_assoc($buddy_request_info)){
$id = $row_buddy_request_info[‘user_id’];
?>
<tr><td class=”rowRight”><a href=”SearchDetails.php?owner_id=<?php echo $id;?>”><?php echo $row_buddy_request_info[‘first_name’].” “. $row_buddy_request_info[‘last_name’]; ?></a> </td>
<td class=”rowRight”><input name=”related[]” type=”checkbox” id=”related” value=”true”></td>
<td class=”rowRight”>
<input name=”approve[]” type=”checkbox” id=”approve” value=”2″>
<input type=”hidden” name=”id” value=”<?php echo $row_buddy_request_info[‘buddy_id’]; ?>”>
</td>
</tr>
<?php }
}?>