Good day everyone! Today! I am going to teach on “CREATING A SIMPLE CHATBOX With SEND PHOTO FEATURE IN PHP/MYSQL”.
This is for developers who wants to develop a website which is for communicating purposes. And this tutorial is a big help for them for starting up it.
Common tutorials in creating a chatbox are for posting only a message. But here, in my tutorial, I add a twist. You can now develop you simple chatbox in which users can post a message only, they can send a message with a photo or they can send or post photo only.
But before we start, make sure you already finished in developing your simple chatbox. I already have an article regarding this. And this may help you for starting up. Just >> click here << to visit my article.
Now if you are already done in the first step in developing your first simple chatbox. We can now add our added feature.
So first, just update the “index.php” file by putting the codes below.
[php]<?php
include ‘connection.php’;
?>
<!DOCTYPE html>
<html>
<head>
<meta charset=”UTF-8″>
<title>ChatBox</title>
<link rel=”stylesheet” href=”chat-style.css”>
</head>
<body>
?>
num_rows; ?> total chats
fetch_assoc()) { ?>
|
” s t y l e = ” w i d t h : 8 0 % ; ” / >
</td> Then on the “post-chat.php” file, update it by putting the following codes. [php]<?php $post = $mysqli->query(“INSERT INTO chats (chat_user, chat_msg, chat_photo, chat_time) VALUES (‘$name’, ‘$msg’, ‘$photo’, ‘$date’)”); Screenshots: If you have questions about “Create Simple Chatbox w/ Send Photo Feature in PHP/MYSQL” feel free to ask us by commenting below or visit on our contact page. Thank you. Related Article you may like: |