Presentation is loading. Please wait.

Presentation is loading. Please wait.

Due Dec 9th simple CHAT with

Similar presentations


Presentation on theme: "Due Dec 9th simple CHAT with"— Presentation transcript:

1 Due Dec 9th simple CHAT with
AJAX PHP MYSQL SQL JAVASCRIPT

2 Test on update Select /retrieve content [ listen button ] Test on update Update DB [on enter text] Test on update Check as part of each update CHAT_CONTENT text NAME primary PASSWORD joe1 007 How are you.. moe2 008 Fine thanks .. CHAT TABLE – 3 COLUMNS

3 CHAT NAME /PASSWORD joe 007 Are you listening to me, Moe? CHAT NAME /PASSWORD moe 008 Yep, I'm here joe. How are things? PHP SCRIPTs + DB LISTEN TO moe listen Yep, I'm here joe. How are things? LISTEN TO joe listen Are you listening to me, Moe BROWSER -1 BROWSER -2

4 CHAT CREDENTIALS /UPDATE 1. Push to DB Use AJAX PHP 2 SEPARATE PHP SCRIPTS MYSQL TABLE CHAT 2. pull from DB Use AJAX Listen to who?

5 onkeyup event => ajax [1st group of ajax functions –
ENTER YOUR NAME /PASSWORD CONTENT BELOW TRANSMITTED AS TYPED onkeyup event => ajax [1st group of ajax functions – http1 is object & functions ] Content entered here sent to your chat table entry in database Content copied to database Chat by php using SQL UPDATE WARNING IN SPAN IF FAIL TO MAKE AN UPDATE Check password in Update listen ENTER name of who to listen to & RETRIEVE their CHAT content on Clicking Listen button Button click => ajax [2nd group of ajax functions http2 is object & functions ] - php now uses SQL SELECT <= Response deposited here Chat retrieved from named person goes here

6 ENTER YOUR NAME /PASSWORD
CONTENT TRANSMITTED AS TYPED joe 999 Keyup event => ajax behavior Content entered here sent to your chat table entry in database Content to database SQL UPDATE This stays same Include checking user and password in Update SQL WARNING – CHAT NOT UPDATED – WRONG CREDENTIALS If fail to update -zero affected rows

7 Optional enhancement ENTER YOUR NAME /PASSWORD
CONTENT TRANSMITTED AS TYPED onkeyup => AJAX PHP SCRIPT SQL update + password and name check ENTERED CONTENT ENTER VALID NAME & RETRIEVE CHAT on listen CLICK poll stop Optional enhancement RETRIEVED CONTENT


Download ppt "Due Dec 9th simple CHAT with"

Similar presentations


Ads by Google