Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_messages($username) {
- if (logged_in($username)) {
- // select query to grab the data the user is allowed to see
- $get_msg_query = mysql_query("SELECT from, subject, message, timestamp WHERE to='$username'");
- while($entry = mysql_fetch_assoc($get_msg_query)) {
- $from = $entry['from'];
- $subject = $entry['subject'];
- $message = $entry['message'];
- $timestamp = $entry['timestamp'];
- }
- }
- // return an array
- return $entry;
- }
Add Comment
Please, Sign In to add comment