professional-ajax-03-Communication-Control-Patterns-Periodic-Refresh-SaveComment.php / php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Save Comment</title> <?php //get information _POST["txtName"]; _POST["txtMessage"]; //database information sDBServer = "your.database.server"; sDBUsername = "your_db_username"; //create the SQL query string sSQL = "Insert into BlogComments(BlogEntryId,Name,Message,Date) ". " values (0,'sMessage',NOW())"; sDBServer,sDBPassword); @mysql_select_db(sStatus = "Unable to open database"; if(sSQL)) { sStatus = "An error occurred while inserting; comment not saved."; } mysql_free_result(oLink); ?> </head> <body> <?php echo </body> </html>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.