[FX.php List] Edit form and if statements

Jon & Jane Montgomery vicepresident at comcast.net
Sun Feb 21 20:14:03 MST 2010


Tim,

Thank you very much.  Lots of code to write as this is a contact info page.
But will be really worth it in the long run.

Thanks to you and Jonathan.

Jon Montgomery


On 2/21/10 9:10 PM, "Tim 'Webko' Booth" <tim at nicheit.com.au> wrote:

> 
> On 22/02/2010, at 2:05 PM, Jon & Jane Montgomery wrote:
> 
>> Please enlighten me on this. They are entering data such as their
>> school
>> name, believe it or not some don't bother to put that.  I do use
>> spry for
>> that but somehow I forgot on the page in question.
>> 
>> 
>> Jon Montgomery
>> 
>> 
>> On 2/21/10 8:56 PM, "Tim 'Webko' Booth" <tim at nicheit.com.au> wrote:
>> 
>>> Then I also check stuff in php on the handling page, as people can
>>> turn JavaScript off and avoid the immediate checking.
> 
> Simple case - let's just have a text field.
> 
> Obviously we can use Spry to say "Fill out your school name, dumkopff"
> - but if they have JacaScript turned off or you forgot, then we should
> test for the existence of the value on the handling page. Long version
> of the check:
> 
> session_start();
> $_SESSION['error'] = "";
> if (isset($_POST['school']) $$ $_POST['school'] != "") {
> echo "All is well";
> //Do all our normal stuff
> } else {
> $_SESSION['error'] = "No school name";
> header['Location: input.php'];
> }
> 
> And check for the existence of the session variable and echo it out to
> the page if required...
> 
> HTH
> 
> Webko
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list




More information about the FX.php_List mailing list