4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

How To Create Livechat Form Or Widget Using PHP-MySQL

What Will I Learn?

  • You will learn how to create simple form
  • You will learn how to create livechat action on you web page
  • You will learn how to connect PHP with MySQL

Requirements

  • you must understand basic of php programming
  • you must understand CSS desain
  • you must understand basic of SQL query

Difficulty

  • Intermediate

Tutorial Contents

live chat form is a form that is very widely used on websites such as online gambling websites, websites for downloading applications, website frequently asked question,etc. this time I will share tutorial how to make a live chat form which connected to database.

  • the first step you should do is create a database via MySQL database.
    image
  • then create a table, you can create via query, and also through the MySQL GUI.
  • type the query below in the SQL column.
CREATE TABLE  `widget`.`chat` (
`nama` VARCHAR( 20 ) NOT NULL ,
`email` VARCHAR( 20 ) NOT NULL ,
`komen` VARCHAR( 30 ) NOT NULL ,
`waktu` VARCHAR( 30 ) NOT NULL ,
`chat` VARCHAR( 30 ) NOT NULL
) 
  • then we will create a form. paste the script below then save it with the name index.php
FULL SCRIPT
```
"); } $Koneksi = mysql_select_db("widget"); if (!$Koneksi){ die ("DBase E !"); } $Tampil="SELECT * FROM chat ORDER BY waktu DESC LIMIT 99;"; Tampil); while ( query)) { hasil['komen']); hasil['waktu']); hasil['nama']); ?> hasil[waktu]
$hasil[komen]
";} ?>

Post your chat:


Name



Email



Chat



Confirm you are NOT robot

 
``` - okay, I'll explain the usefulness of the script above. - this is the part for database connection with php form. customize it with your database name. ``` mysql_close($Open); } if (empty($_POST['nama'])|| empty($_POST['email']) || empty($_POST['komen'])) { ?>
2 upvotes $0.00

Replies (2)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: