Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java Homework script
Code with comments would be highly appreciated
 
A developer wants to update a database and display a message to the user without refreshing the page. He is essentially going to use AJAX. Suppose you have the following PHP code snippet that queries a MYSQL database and is stored at
 
http://mydomain.com/update.php
mysql_query(“UPDATE table_name WHERE column_name = ‘$var’”) ;
 
echo “Database successfully updated” ; 
 
?>
 
Make an AJAX request (JQuery if you want) to retrieve data from the URL above.
Change a div element with ID = “message” to the response of the AJAX call.
Posted 30-Nov-12 23:19pm
NFS_91264
Edited 30-Nov-12 23:23pm
v3

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This looks like homework.
 
It would be best if you did your own homework. It is given to you so that you will learn something, think about what have been taught. Read your text books and give it a try.
 
Once you have code and run into problems you can always come back here with a more specific question and the community will do its best to help you. Don't forget to post only the relevant code bits that pose the problem as a code dump is not usually helpful at all in getting someone to help/assist you.
 
Good luck and happy coding.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 315
1 OriginalGriff 273
2 Aajmot Sk 224
3 Marcin Kozub 210
4 Richard MacCutchan 200
0 OriginalGriff 7,853
1 Sergey Alexandrovich Kryukov 7,107
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 1 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100