Re: Processing using a single PHP file

From: Date: Sun, 04 Feb 2001 16:19:17 +0000
Subject: Re: Processing using a single PHP file
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6358@lists.php.net to get a copy of this message
Yes .. you can do it like this. Have two functions 1)generateForm(); 2)processData(); In the generateForm function use a hidden form field called say "action" with a value say "process" Then put a code like this. if ($action == "process") { processData(); } else { generateForm(); } HTH Jaski At 12:08 PM 2/4/01 +0000, Sridhar Ranganathan wrote: >Hi Netlanders > >Traditionally, we have two files in our apps. A HTML page that has a form >and a PHP file that processes the form info. I have a web-based front end >that is used to added data to a table. Can I do this with one PHP file >alone? > >Regards >Sridhar Ranganathan >_________________________________________________________________________ >Get Your Private, Free E-mail from MSN Hotmail at >http://www.hotmail.com. > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >For additional commands, e-mail: php-db-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#6358) next »