FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » validation of a text box input...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: validation of a text box input... [message #180802 is a reply to message #180784] Tue, 19 March 2013 16:13 Go to previous messageGo to previous message
Salvatore is currently offline  Salvatore
Messages: 38
Registered: September 2012
Karma:
Member
On 2013-03-18, nag <visitnag(at)gmail(dot)com> wrote:
> [snip]
>
> Thanking you.

I see several problems:

1. You aren't stopping anything from happening when the $_GET['agnt']
superglobal is empty. All your script does is echo out an error message:

> if(!empty($_GET['agnt'])){
> $agnt=$_GET['agnt'];
> }else{echo "Enter agents code!";}

2. The "$agnt" variable isn't declared in the right scope. PHP will
probably handle this for you and will only issue you a warning, but you
shouldn't keep the declaration of $agnt in the top of club.php.

3. In your <form> tag, you are setting the action to
"club.php?agnt=$agnt", and your request method is set to "GET". Instead
of forcefully setting the "agnt" request variable in the <form> tag, you
should set it in its respective <input> tag.

--
Blah blah bleh...
GCS/CM d(-)@>-- s+:- !a C++$ UBL++++$ L+$ W+++$ w M++ Y++ b++
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php curl only saves a cookie with tempnam()
Next Topic: Test Message
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 14 21:24:10 GMT 2024

Total time taken to generate the page: 0.05726 seconds