Re: [PHP] resubmit form after validation error

2009-06-23 Thread Shawn McKenzie
PJ wrote: > Shawn McKenzie wrote: >> PJ wrote: >> >>> Caner Bulut wrote: >>> Hi PJ, You can use the structure following $bid = htmlentities($_GET['id']); >>> the code below >>> if(empty($bid) { $bid=0; } >>> produces

Re: [PHP] resubmit form after validation error

2009-06-23 Thread PJ
Shawn McKenzie wrote: > PJ wrote: > >> Caner Bulut wrote: >> >>> Hi PJ, >>> >>> You can use the structure following >>> >>> $bid = htmlentities($_GET['id']); >>> >>> >> the code below >> >>> if(empty($bid) { >>> $bid=0; >>> } >>> >> produces an empty screen with no error

Re: [PHP] resubmit form after validation error

2009-06-23 Thread Andrew Ballard
On Tue, Jun 23, 2009 at 11:37 AM, Shawn McKenzie wrote: > PJ wrote: >> Caner Bulut wrote: >>> Hi PJ, >>> >>> You can use the structure following >>> >>> $bid = htmlentities($_GET['id']); >>> >> the code below >>> if(empty($bid) { >>> $bid=0; >>> } >> produces an empty screen with no error messages.

Re: [PHP] resubmit form after validation error

2009-06-23 Thread Shawn McKenzie
PJ wrote: > Caner Bulut wrote: >> Hi PJ, >> >> You can use the structure following >> >> $bid = htmlentities($_GET['id']); >> > the code below >> if(empty($bid) { >> $bid=0; >> } > produces an empty screen with no error messages... > I have been having some trouble understanding "empty()" -- it doe

Re: [PHP] resubmit form after validation error

2009-06-23 Thread PJ
Caner Bulut wrote: > Hi PJ, > > You can use the structure following > > $bid = htmlentities($_GET['id']); > the code below > if(empty($bid) { > $bid=0; > } produces an empty screen with no error messages... I have been having some trouble understanding "empty()" -- it doesn't seem to want to work f

Re: [PHP] resubmit form after validation error

2009-06-22 Thread Caner Bulut
Hi PJ, You can use the structure following $bid = htmlentities($_GET['id']); if(empty($bid) { $bid=0; } if(is_numeric($bid)) { if($bid==0) { do something } else if($bid==1) { do something } } After this code there will always a number, If the id variable is 0, bid will be 0 and you can con

Re: [PHP] resubmit form after validation error

2009-06-22 Thread PJ
Hi Caner, Thanks for the input. I'm not sure that would do it as the first instruction on the page is : $bid = $_GET['id'] ; thus, the page cannot even be loaded if there is no id in the uri - it generates a number of errors. In order to use the feature of editing, I use a search page and then set

RE: [PHP] resubmit form after validation error

2009-06-20 Thread Caner BULUT
Hi, You can use a variable to that. Like following. Example if the variable is 1 you start to processing form input. Example mailto:af.gour...@videotron.ca] Sent: 20 June 2009 22:55 To: php-general@lists.php.net Subject: [PHP] resubmit form after validation error I'm having a bit of a time fi