Welcome Guest ( Log In | Register )




                Web Hosting Guide

3 Pages V  < 1 2 3 >  
Reply to this topicNew Topic
How To Make A Private Message System.
yyhananyy
post Nov 2 2008, 12:03 AM
Post #11


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 2
Joined: 1-November 08
Member No.: 34,426


Hello,
i try to do your system in my site, i change the $_SESSION in al the files,
in inbox.php it's work great ! i can see the messages, in new_message.php work too, i can send a message.
i have just a 2 problmes please help me,
in read_message.php
i cant see the what people wrote, i cant see who sending the message!
in PHPMYADMIN, it's OK
i see the fields good !
from_user
to_user
message_content
and all...
but in the site i cant see anything in read_message.php ... please Help me.

another tiny problem, when i didnt open a message it's write "New" near to the Title
and when i open the message and go back to inbox, it's still write New near to title,
it's not update the mysql...

please help me with this to problems !

thanks !
Go to the top of the page
 
+Quote Post
sam_benne
post Nov 3 2008, 03:03 PM
Post #12


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 1
Joined: 3-November 08
Member No.: 34,497


QUOTE(yyhananyy @ Nov 2 2008, 12:03 AM) [snapback]130261[/snapback]
Hello,
i try to do your system in my site, i change the $_SESSION in al the files,
in inbox.php it's work great ! i can see the messages, in new_message.php work too, i can send a message.
i have just a 2 problmes please help me,
in read_message.php
i cant see the what people wrote, i cant see who sending the message!
in PHPMYADMIN, it's OK
i see the fields good !
from_user
to_user
message_content
and all...
but in the site i cant see anything in read_message.php ... please Help me.

another tiny problem, when i didnt open a message it's write "New" near to the Title
and when i open the message and go back to inbox, it's still write New near to title,
it's not update the mysql...

please help me with this to problems !

thanks !


I have the exact same problem! And I believe the problem is this line $messageid = $_GET['message']; as it isn't getting the id. so change it to $messageid = $_GET['messageid'];

This post has been edited by sam_benne: Nov 3 2008, 03:11 PM
Go to the top of the page
 
+Quote Post
yyhananyy
post Nov 8 2008, 01:01 AM
Post #13


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 2
Joined: 1-November 08
Member No.: 34,426


it does'nt work sad.gif
i dont know what to do !
help please !
Go to the top of the page
 
+Quote Post
liod
post Nov 18 2008, 09:50 AM
Post #14


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 4
Joined: 29-August 08
Member No.: 32,322


Hey, i like your AJAX. I can create ligin and PM script but i dunno about combining with ajax.
Thank you. biggrin.gif
Go to the top of the page
 
+Quote Post
joneejay
post Apr 19 2009, 09:53 AM
Post #15


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 1
Joined: 19-April 09
Member No.: 39,652


hey guys,

sorry to open up an old thread, but just wondered if anyone could help me get this working?

inbox.php shows message title and (new) and if i click one through to

read_message.php?messageid=28 I just get

TITLE:

FROM:

MESSAGE:

[back to inbox]

I've checked phpmyadmin, and the from_user is empty as well as the date (i added this field manually because it wasn't in the .sql file.

Any help would be appreciated I'm new to mysql.

Thanks guys smile.gif
Go to the top of the page
 
+Quote Post
yordan
post Apr 20 2009, 08:46 AM
Post #16


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 3,106
Joined: 16-August 05
Member No.: 7,896
myCENTs:52.10


QUOTE (joneejay @ Apr 19 2009, 11:53 AM) *
h the from_user is empty as well as the date (i added this field manually because it wasn't in the .sql file.

Where is this .sql file coming from? Did you get it from the feelay starter topic text ?
Go to the top of the page
 
+Quote Post
qiqiprop
post May 27 2009, 07:01 AM
Post #17


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 1
Joined: 27-May 09
Member No.: 40,573


Hai,
Thanks for the tutorial. It's very helpful. But there is one thing that I would like to know. How to display that you got a new message on page? I know it is something related with the "message_read" variable of that table but you didn't mention how it works..
Go to the top of the page
 
+Quote Post
iGuest
post May 23 2009, 05:33 PM
Post #18


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


Maybe use isset?
How To Make A Private Message System.

hey Feelay,

I was just wondering... I'm pretty new with this MySQL and PHP stuff, but wouldit be possible for the read_message.Php to have code that checks if isset($message) and then echoes the message and message information, like who sent it and when, if that variable is set (and that would be based on the checking whether the user logged in is the same as the to_user and if the session is valid). Else, it could echo an error saying something like, "You are not allowed to view this message because: 1. You are not logged in, or 2. You are trying to view someone else's message!"

This is just a thought. I'm not sure it would work in practice, so let me know if they can use this successfully! Thanks

-reply by newPHP-er

 

Go to the top of the page
 
+Quote Post
pippo
post Jul 24 2009, 06:07 AM
Post #19


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 1
Joined: 23-March 09
Member No.: 38,986


in read_message.php

edit:
$messageid = $_GET['messageid'];
$message = mysql_query("SELECT * FROM messages WHERE message_id = '$messageid' AND to_user = '$userfinal'");
$message=mysql_fetch_assoc($message);

and at the end of the file edit

$q="UPDATE messages SET message_read='1' WHERE message_id = '$messageid' AND to_user = '$userfinal'";
mysql_query($q);

?>
(this is to check if the message was read)

this system must be edited right to work well

This post has been edited by pippo: Jul 24 2009, 06:14 AM
Go to the top of the page
 
+Quote Post
iGuest
post Jul 23 2009, 09:11 AM
Post #20


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869


i get this error
How To Make A Private Message System.

I get this error

Could not send the message:
Unknown column 'message_date' in 'field list'

-reply by jacob

Go to the top of the page
 
+Quote Post

3 Pages V  < 1 2 3 >
Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No new   28 Ed :P 9,694 16th March 2010 - 07:36 PM
Last post by: iG-Luke
No new   20 dhanesh 15,687 16th March 2010 - 03:15 PM
Last post by: iG-maze
No New Posts   3 chizeled 3,191 2nd March 2010 - 12:54 PM
Last post by: iG-captaincaffinee
No New Posts   15 Normano 1,461 23rd February 2010 - 10:34 PM
Last post by: iG-
No New Posts   1 tansqrx 1,499 19th February 2010 - 08:46 PM
Last post by: iG-bob jones
No New Posts   3 jord2 1,797 18th February 2010 - 02:13 AM
Last post by: iG-Tariq Khan
No New Posts   15 WeaponX 9,679 16th February 2010 - 04:32 AM
Last post by: iG-
No New Posts   6 8ennett 259 3rd February 2010 - 08:32 AM
Last post by: Eggie
No New Posts   1 wutske 2,148 1st February 2010 - 09:44 AM
Last post by: iG-weGIF
No new   38 ebbinger_413 15,643 31st January 2010 - 01:44 AM
Last post by: Nelson Blogs
No New Posts   14 tansqrx 15,339 28th January 2010 - 04:01 PM
Last post by: iG-
No New Posts 3 steevereynolds 202 27th January 2010 - 02:51 PM
Last post by: wutske
No New Posts   11 wannabeeaweak 5,459 27th January 2010 - 12:01 PM
Last post by: Bocarius
No new   25 JohnNitro 15,384 26th January 2010 - 11:30 AM
Last post by: iG-mdshare
No New Posts   5 Miles 1,758 25th January 2010 - 02:41 PM
Last post by: iG-Taylan


Web Hosting Powered by ComputingHost.com.
HONESTY ROCKS! truth rules.
Creative Commons License