itssami
Apr 11 2006, 06:54 AM
| | i want to learn how members of a website can send messeges to each other using php since im learning it. okay i can write in more detail..that for example if users can register on a website , suppose there are some users on the website , and now i want to learn how they can send messeges to each other.suppose each user has a unique ID ... and for example if some one has send the messege to other member of website , then he can know that he has recieved a new messege..something like inbox on the website where all of his messeges can be stored...lets say same way like on these IPB forums or any phpbb forums ? of course i know that there are endless CMS and forums which i can install and do it but as i said i want to learn it. so if some one can tell about some idea or some tutorial about it or any URL guiding this.thanks alot. |
Reply
Spectre
Apr 11 2006, 01:45 PM
A simple approach would be to store the message in a database, along with the ID of who it was sent to, and then display it to the recipient the next time they log in. For example, Arthur sends a message to a user called 'Martha'. The script that checks the database for a user called 'Martha', and discovers that her ID is 53. It then stores the message in the database, along with the ID 53. Then once user 53 or 'Martha' logs in again, it simply displays the message on her screen (or informs her that a message has arrived). I wont' write out all the code for you, but it's certainly not difficult to do.
Reply
shadowx
Apr 12 2006, 02:17 PM
I'm not an expert with databases so correct me if im wrong but dont they have a limit to the amount of characters that can be stored in one feild? If they do, which I think they do, I would store each message into a file with an auto genereated filename, maybe a number which is one more than the one before it. Then using php to protect that file, maybe by using a session to see if the user is authorised to veiw it. Then in a database alongside the member who RECEIVED the message have a feild for message number and store the file name/number in that feild. Then when a user logs in have the database check to see if there is a message and if there is use php to take the file name/number and open the file to display the contents to the receiver. For storing multiple messages you could delimit (SP?) the file names/numbers by using commas and have the php script seperate them all out, example "filenames: 123, 456, 789" php would seperate them into "filename:123 filename:456 and filename:789" This would allow users to 'save' more than one message. And when they want to read one of them the php file will take "123" add an extension "123.php" and then display it to them. I hope that makes sense. I think this could be better than using a database because there wouldnt be a limit on the amount of chaacters that a message can contain however it might not be as secure as a database but if you used some kind of authentification. The best thing for you to do would be to look up database and file functions in php and make your own decision. This was just an idea to spark a plan 
Reply
Spectre
Apr 13 2006, 01:11 AM
In MySQL, it depends on the data type. The maximum length of a VARCHAR type, for instance, is specified in the field's creation (eg. field_name VARCHAR(limit)), with an absolute peak of 255 characters in older versions of MySQL (<= 4x, I think). The TEXT type, however, has a much larger limit of 65,535 characters, and chances of a text-based message being that long is slim. There are other data types though; such as LONGTEXT, which has a limit of 4,294,967,295 characters (that's about 3.9-4GB of text).
Reply
Similar Topics
Keywords : sending messeges website- Sending E-mails After News Update?
- Coding needed?!? (8)
I need the following code or the idea how to reach this concept. Let's say, I have a database
entry which is called "news", where all of the news stories are stored. If this database entry got
modified, like the new post was added to the web-site by an administrator, the registered users will
get some kind of email notification automatically, I mean the mails are sent automatically without
the interaction of someone else. ...
Sending E-mails Based On Intervals?
- (7)
Creating A Login Box That Links To My Phpbb Forum
- Have my phpBB Forum Intergrated with my Website (4)
Can someone please give me a code that I can use to put a login box on my website, that will login a
user into my phpBB Forum? Sort of like Having my phpBB Forum Intergrated with my Website? Thank you
so much if you can! /angel.gif" style="vertical-align:middle" emoid=":angel:" border="0"
alt="angel.gif" /> Ex. ...
Sending $_get[] Variables To An Application
- (3)
I'm trying to work out if it is possible to send variables to a application on server. E.g
send the variable of id which is equal to 10 to an application - test.exe?id=10 Any ideas to see if
this is possible?...
Email Sending.
- email sending with php. (1)
this script allow user to send an email for you. i hope you enjoy /wink.gif"
style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> CODE
[color="#0000ff"][indent]<? $top='<html
dir="rtl"> <head> <meta http-equiv="Content-Language"
content="fa"> <meta http-equiv="Content-Type" content="text/html;
charset=utf-8"> </head> <body> <div
align="center"> <p style="margin-top&...
Updating Website From Another -- Website
- Is it possible, and how? (7)
i was just thinking about this project that i'm doing, and i thought that it would be a good
thing that i could update my website let's say on trap17 from my localhost computer with a click
of a mouse, without all of that ftp mambo-yumbo the thing is that i wanted an "UPDATE" button on my
site which woud connect to my localhost and update all the things needed. let's say i added few
profiles localy, and i want to update them on site.. how could it be done. if i was crude in
explanation please write what info u still need and i'll post it back......
Help With Some Website Coding
- Databases and saving form results (4)
Hey all, I was looking for some help with creating my new website. I have a form already created,
with some text areas, checkboxes, drop down menu's, ect. I need some help setting up the code to
save the form data once the user clicks "Submit" after filling in their information in the form. I
was hoping to do this 2 ways - 1. Saving the information into some type of database (MySQL I'm
guessing?) and 2. Have the form results emailed to me. I am familiar with the old way of emailing
the results by putting "mailto:email@domain.com" into the form, but new browse...
Phpnuke Newsletter Sending Problems
- (0)
i have a problem sending newsletters....when i send them no1 receives it...i tried sending to the
registered users on my site which im in and i didnt recieve it in my mail...i dont know why this is
happening...it says the newsletter is sent...but we get nothing in our mail... heres the code
QUOTE /************************************************************************/ /* PHP-NUKE:
Web Portal System */ /* ===========================
*/ /* ...
Question: Securing A Website For Beginners
- (1)
I don't really understand 'bout it. What kind of security we have to make to hold our web
secure. Only log in features? how bout 'deface' method? how does it work? thx in advance
Please use detailed topic title. ...
How I Can Display Forum Topic On Main Website ?
- (4)
Suppose i have a website.. domain.com , and have phpbb forums on domain.com/forums.. And i want to
display the new topics written in the forum on the main page of website...how i can do that.. ? for
example ,I want to display this topic `? "domain.com/forums/viewtopic.php?t=16" how can i do
that ?...
Can My Forum And Website Use The Same Profiles?
- (3)
I've been programming a 'rate-em' site from scratch. You know like Hot Or Not. YEs,..
yet another rate-em website. Anyway, i'ts done and before I launch it I need to add a forum as
the finishing touch, but all the forum softeware out there seems so hard to integrate. I'm
trying to make it so that when a user logs into my rate-em website they are also logged into 'my
forum'. i.e. i want my forum and web site to use the same profile data. If anyone knows of a
forum program made for this objective please let me know. I'm in over my head, a...
Sending Attachments Using Email Function In Php
- (2)
I'm trying to send an attachment using the mail Php function. It gets caught by the email
server with an error. It seems to have a problem with the separator or who knows what. The server
says something like "invalid separator on mime type." The code is: Code: CODE // subject
$subject = "Hello There "; $mime_boundary =
"<<<--==-->>>"; // headers $headers =
"From: " . 'Tom' . " <" . 'texample@aol.com' .
">\r\n"; ...
Music Website
- (3)
http://www.metalmania.net I'm pretty much a novice when it comes to php/mysql and I have been
trying to figure out how to build something similar to the way the site above works. Do any of you
know of a tutorial or script or something that would show me how to accomplish something very
similar to that? I have also been exploring phpnuke platinum with the TopMusic mod, but it just
doesnt want to do what I want it to do. Sure it has a lot of features already done for me, but the
architecture and navigation is very poor in my opinion, not nearly as efficent as the n...
How Handle Sending Back Multiple Checkboxes
- (1)
I know how to send back the check-boxes, so that's not the issue. I have a form that contains a
group of 5 check-boxes. The user could select none, one, all, or any combination in between.
I'm working on form validation right now and am doing most of it server side. The validation is
set so that if the user has to go back all their data is retained. I'm using case statements,
which work wonderfully, but in this circumstance I don't know what would be the best method that
allows for a multitude of combinations. I think there is a possibility of somethi...
Free Website Portal
- (2)
hey everyone, have you ever used PHP??? well if you have you know how cool it is and nice to work
with and it has nice mods and stuff for it.... well i got the ultimate php its called
PHP-Platinum very very very nice Portal and Engine Coding, slick sleek and smooth are 3 words for
this portal... if you want to see it in action and see features of it or even download it and check
it out for yourself visit this site PHP-Nuke Platinum Features & Downloads its a very nice
thing to use so go check it out, i love it cause its got nice protection so your site stays s...
Website Help
- Need php programmers to help me. (10)
I need some php programmers help. I am working on a website. I have asked for some code in another
topic and would now like help. These will possibly be sold. And if they do I am willing to pay the
people who help me out a lot some of it. Dun start asking to help and like help a tiny bit and
expect to get something big out of it. I am only paying to people who help a lot and once they are
sent out. You must also be good with making clan websites. These will be for clans. If you bother me
about getting money than no pay. More info on aim. My aim is generalds2001...
Trouble With Emailer.php
- failed sending email error (5)
Whenever someone registers at my forum, they get this error: Failed sending email :: PHP :: DEBUG
MODE Line : 234 File : emailer.php however, the account will be sucessfully registered. It is
weird because i did not change the original emailer.php at all. O__O||| anyone know whats up with
it?...
Php Website Assistance?
- Help Me (1)
Hello, i have just set up a website, and want to protect the site using login and password
protection. Can anyone give me some PHP scripts which will keep a track of usernames and passwords,
and add them to the access rights list. is this possible? If so, i would be much obliged if you
would do so. Thank you. P.S If anyone needs assistance with HTML, that is my speciality, so send
me a message. Always happy to help...
Need Help With My Website
- (4)
Hello, i have Invision Power Board v3, my website is http://www.generatione.trap17.com/forums] , I
am doing this website for this organization. Anyhow, i still dont have a home page, but i have the
forum part set up. And that is what i need some help on. and i had a couple of questions in which i
was wondering if you guys new how to change these settings. How can i change the title of my
website? The current one is New Directions - Forum (Powered by Invision Power Board). How can i
put more links in for example in trap17 there are , i was wondering how could i ...
Links To Lots Of Usefull Website
- I AM NOT SPAMING THIS TOOK ME 15 MINUTES (1)
HELLO HERES A LIST OF LOTS OF USEFULL SITES I FOUND: || Codecs || http://www.free-codecs.com
http://www.codecsdownload.com http://www.freecodecs.net http://www.click-now.net
http://www.click-now.org || Search Engines || www.google.com www.search.com www.altalavista.com
www.AllSearchEngines.com www.mamma.com || Programming Help Sites || www.patorjk.com
www.planet-source-code.com www.freevbcode.com www.codearchive.com www.vbaccelerator.com
www.vbcode.com www.abstractvb.com www.developerfusion.com www.codeproject.com www.extreme-vb.net ||
Free Online Game Play || ...
Website Made With Php
- help... (31)
I want to create and interactive website, similar to ' Free Web Templates ' I do not have
the knowledge to create such a website where users sign up, login, and have profile pages, also
pages displaying their contributions.... If someone could create a base for this website for me,
e.g, login page, mambers page, profile page, creations page and so on... which I can then change the
layout and so on to suit my needs... I can off a small amount of money for this, however, not alot.
Any response is welcome, Thank you, Craig....
Very Good Php Website
- Informations about php editors (10)
Just go here: http://www.php-editors.com/ ...
Debugging Your Php Or Your Website
- Very easy and proven steps! (6)
First, download Apache 2 (Web Server) from http://www.apache.org Second, download PHP Binaries
from http://www.php.net On the installation of Apache 2, when you are asked for the website
address, just enter 127.0.0.1 That's it, to integrate PHP Binaries to Apache 2, check out the
Apache documentation and the PHP documentation. To access your offline debugging website, go to
your browser, and navigate to 127.0.0.1 or 127.0.0.1:8080...
Help About My Website
- Need comments and suggestions (7)
/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /> Hi. I need your
comments and suggestions. Please do visit my website at http://www.karlo.co.nr and tell me what
you think. If you want the source code of my website, just send me a message and I will send it to
you. I'm still a beginner in PHP so please do guide me into the right path of PHP programming
/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /> Thanks.
/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /> ...
Looking for sending, messeges, website
|
|
Searching Video's for sending, messeges, website
|
advertisement
|
|