I'm learning PHP, so I'm just making this simple system.
So what I want to happen is: if the user has no private messages it displays a message. Otherwise it shows the messages (haven't done that yet). I just want some confirmation that the code will work, and if it doesn't what's worng with it.
+repPHP Code:<?php
$query = mysql_query("SELECT * FROM `private_messages` WHERE `id` = '".$sess_id."' ORDER BY date DESC");
$pm_count = mysql_num_rows($query);
if($pm_count == 0){
echo 'You do not have any messages at this time.';
} else{
wotev;
}
?>
Moved by Invent (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks.





.
Reply With Quote




lol.