Maxamus53 Posted January 27, 2012 Share Posted January 27, 2012 Hi, guys. I am a php newb and stuck (see title). I it will only send the value of 1 tick box over to the page "delete_message.php" This is what i have so far: <?php // get messages $result = mysql_query("SELECT * FROM tbl_pvt_msg WHERE to_UID='$UID'"); if (!$result) die("Query to show fields from table failed"); while ($data=mysql_fetch_array($result)) { $_SESSION['from_UID']=$data['1']; UIDtoemail(); $from_email=$_SESSION['from_email']; $contents=$data['3']; $timesent=$data['4']; $msg_ID=$data['0']; echo "<form action='scripts/delete_message.php' method='POST' >"; echo "<tr><td>$from_email</td><td>$contents</td><td>$timesent</td><td><input type='checkbox' value='$msg_ID' name='msg_ID' /></td> </tr>"; } // turn uid into email function UIDtoemail(){ $from_UID=$_SESSION['from_UID']; $result = mysql_query("SELECT * FROM tbl_usr WHERE UID='$from_UID'"); if (!$result) die("Query to show fields from table failed"); $data=mysql_fetch_array($result); $_SESSION['from_email']=$data['7']; } ?> </table> <input type="submit" value="Delete" id="delete" /> </form> Quote Link to comment Share on other sites More sharing options...
Maxamus53 Posted January 27, 2012 Author Share Posted January 27, 2012 Fixed it, sorry I had a stupid moment Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.