Hello there,
I want to introduce message system in my website. I've created table fields as follows:
id(int), receiver_id, msg_id, msg_sub, msg_desc, msg_time

Below is my html form in which registered users will be displayed in dropdown list:

<form class="form-horizontal" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    <legend>Send Message</legend>
        Recipient:<select name="receiver_id" data-rel="chosen" onchange="showValues()">
                $query = "SELECT * FROM star.users";
                $run = mysql_query($query);
                while( $row = mysql_fetch_assoc($run) ){
                    $receiver_id = $row['id'];
                    $usrname = $row['username'];
            <option value="<?php echo $receiver_id; ?>" ><?php echo $usrname; ?></option>
            <?php } ?>
            Subject:<input type="text" name="msg_sub" value="" />
            Message:<textarea name="msg_desc" rows="4" value="" /></textarea>
             <button type="submit" name="send">Send</button>
             <button type="reset" >Cancel</button>

Now how to get receiver id from selected user and send sms to that user ?

4 Years
Discussion Span
Last Post by nadiam

Okay, But How to send message to the selected user and store in database ?


Hello nadiam thanx for your reply, But I want to send message to the registered users inbox on this website only. Not to mobile phone.

Like one facebook user send message to another user.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.