RE: [PHP-DB] How-to pass informational mysql messages to the browser

From: Date: Fri, 25 Feb 2005 17:46:15 +0000
Subject: RE: [PHP-DB] How-to pass informational mysql messages to the browser
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-38675@lists.php.net to get a copy of this message
I like to use a js alert box to notify the users /*************************************************************************
              alert box popup confimation message function
*************************************************************************/ function confirm($msg) { echo "<script langauge=\"javascript\">alert(\"".$msg."\");</script>"; }//end function Then in the code I create the message as needed. In your case, you can validate the query worked and then do : $msg = "Tape deleted"; //simple to even add the tape number in as well confirm($msg); bastien
From: "Mike Millner" <mike@mikeshome.com> To: <php-db@lists.php.net> Subject: [PHP-DB] How-to pass informational mysql messages to the browser Date: Thu, 24 Feb 2005 15:07:00 -0700 Hello everyone, My PHP/mysql pages are working perfectly, the problem is users don't know if what they are doing is working. I have a system that adds and deletes tape id's from mysql via a PHP front end. I would like to pass the same success/failure messages that I would get if I performed the add/delete directly within mysql. For example, If I delete a tape from the db within mysql, after I hit enter I get the following message: mysql> delete from tape_tracking_test where media_id like 'TR44'; Query OK, 1 row affected (0.01 sec) I would like to display this message to the browser: Query OK, 1 row affected (0.01 sec) Any help would be appreciated, Thanks, Mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.db (#38675) next »