Hello guys, I have this school project. There is one aspect that I'm not sure of.
So, here's the project description. The project is chatting. Well, you know how chatting works. When I type a message, that message will appear on the other person's computer.
Anyway, the part wherein Im not sure of is how this appearing of message to the other computer works. I have a cable wire that will connect two computers. If I run my server, and I and my partner will chat, do I need some networking php code or just the normal ones?
Anyway, I'm not really sure how this works, I need some help from you experts.
Whilliam
0
Junior Poster
Recommended Answers
Jump to PostHere is a bit chat script.
<form method="post"> <?php if (isset($_POST['chat']) && trim($_POST['chat'])) { file_put_contents('chat.txt', $_POST['chat'] . "\n", FILE_APPEND); } echo @implode('<br />', @file('chat.txt')) . '<br />'; ?> <input name="chat" /> <button type="submit">Send</button> <button type="submit">Refresh</button> </form>
This is meant to learn from, nothing else. You need JavaScript …
Jump to PostLearn AJAX. It will be essential!
All 5 Replies
digital-ether
399
Nearly a Posting Virtuoso
Team Colleague
Stefano Mtangoo
455
Senior Poster
jack4321
-3
Newbie Poster
maxlipman
-9
Light Poster
maxlipman
-9
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.