Page 1 of 1

Chat Room idmatosend Answer the following questions to implement the web application. Question t Write the jQuery code

Posted: Mon Jun 06, 2022 1:53 pm
by answerhappygod
Chat Room Idmatosend Answer The Following Questions To Implement The Web Application Question T Write The Jquery Code 1
Chat Room Idmatosend Answer The Following Questions To Implement The Web Application Question T Write The Jquery Code 1 (14 KiB) Viewed 17 times
Chat Room Idmatosend Answer The Following Questions To Implement The Web Application Question T Write The Jquery Code 2
Chat Room Idmatosend Answer The Following Questions To Implement The Web Application Question T Write The Jquery Code 2 (20.69 KiB) Viewed 17 times
Chat Room idmatosend

Answer the following questions to implement the web application. Question t Write the jQuery code which allows to send through an AJAX request the message entered by the user in the Message to send text input with idemessgetosend) and the user name saved in the session with the ey username when the user clicks the button Send to the PHP script save sage.php using the POST method. The AJAX request should be send only if the message entered in the text input is not empty. Once the AJAX request is successfully sent the text input should be reset to empty Question 2: write a jQuery function which loads into the text area with id receivedmessages the messages sent to the chat room by all the users through an AJAX request sent to the PHP script etmessages.ph Question 3: Write the PHP script savemessage pher which receives the username and the message from the POST request into variables connect to the database messageDB located in the server host.com using the user name voor and password toor if the connection is well established insert the username and the message in the table messagestusername VARCHARZmessage VARCHARI. Ese at the function de dose the connection Question connect to the database messagebe located in the server host.com using the user name your and password oor if the connection is well established select all the message from the table messagestusername VARCHARZmessage VARCHAR2) the call the function de loop through the SELECT result and put the messages into a string variabile using the following format: "usernamet; messagetin username2: message2nusemamen message print the string variable containing the formated messages close the connection