+ 1

How to create a simple messaging service using PHP and MySQL?

I want to create a simple website in which I can message the other user. You can take your own variable and database. P.S. I'm using wamp.

24th Dec 2016, 7:26 PM
Vyom Srivastava
Vyom Srivastava - avatar
2 Antworten
+ 3
what type of message? If is an email you can use the following basic script <?php // The message $message = "Line 1\r\nLine 2\r\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70, "\r\n"); // Send mail('caffeinated@example.com', 'My Subject', $message); ?>
25th Dec 2016, 7:08 PM
Ian Croasdell
Ian Croasdell - avatar
0
@Ian Thanks For the answer. What if I want to use database to store messages and retrieve them afterwards
25th Dec 2016, 7:10 PM
Vyom Srivastava
Vyom Srivastava - avatar