RE: [PHP-DB] how to add UPDATE,DELETE for inventory management system using sqlite db
| From: | Bastien Koert | Date: | Fri, 05 Nov 2004 14:20:22 +0000 |
| Subject: | RE: [PHP-DB] how to add UPDATE,DELETE for inventory management system using sqlite db | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37181@lists.php.net to get a copy of this message | ||
The logical way t o approach this is to add the buttons and have some control code that passes control off to a function based on what button was pressed.
<?
if (isset($_POST['submit'])){
$btnSubmit = $_POST['submit'];
}
if ($bntSubmit=="Add"){ add(); } //add / edit (update) are all the same function
if ($bntSubmit=="Delete"){ delete(); }
if ($bntSubmit=="Select"){ Select(); }
function add()
{
}
function delete()
{
}
function select()
{
}
?>
Bastien
From: "balwantsingh" <balwantsingh@Indoasian.com> Reply-To: <balwantsingh@Indoasian.com> To: "'Aravalli Sai'" <aravallisai@yahoo.com>, <php-db@lists.php.net> Subject: RE: [PHP-DB] how to add UPDATE,DELETE for inventory management system using sqlite db Date: Fri, 5 Nov 2004 10:12:08 +0530 yes you can add more submit buttons like save and give name them as update, select etc. etc. if i had in your place, i do the following:- for example - when user clicks on update buttons than one page should be opened asking information i.e. what fields he want to update etc. etc. and on a clicking a submit button which should be placed on the same page may be named as "update", the data is updated. with best wishes balwant -----Original Message----- From: Aravalli Sai [mailto:aravallisai@yahoo.com] Sent: Friday, November 05, 2004 3:29 AM To: php-db@lists.php.net Subject: [PHP-DB] how to add UPDATE,DELETE for inventory management system using sqlite db hi i had designed an user interface for inventory management system using sqlite db.i had used 'SAVE' button so far for inserting values into the database from the user. now i want to add some other buttons such as UPDATE,SELECT,DELETE...to the interface... can some one giv me an idea for doing this... thanks in advance.... regards, sai __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php