Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #8738
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!yojimbo.hack!news.tokachu.com!.POSTED!not-for-mail |
|---|---|
| From | Salvatore <sal@yojimbo.hack.invalid> |
| Newsgroups | comp.lang.php |
| Subject | Re: validation of a text box input... |
| Date | Tue, 19 Mar 2013 16:13:40 +0000 (UTC) |
| Organization | Yojimbo NNTP server |
| Lines | 26 |
| Message-ID | <kia2rk$8jo$1@yojimbo.hack> (permalink) |
| References | <a00dc856-f0c2-4dda-b972-bb8fc7097ce6@googlegroups.com> <ki7ls2$2cfq$1@yojimbo.hack> <518e6477-8f53-4d84-a138-7d8b54418521@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Trace | yojimbo.hack "kq(Iga%czn" |
| X-Complaints-To | usenet(at)tokachu(dot)com |
| User-Agent | slrn/0.9.9p1 (FreeBSD) |
| X-Watermark | "Q(<g$Wn^Dp2d1W#t>N`xSFJJZ4vJf}zb(fY-t=}&jLLa7-?_QY8Xb&H1bs1t" |
| X-Reader-User | hidden; display="24EEr1QzLVIfRpxx65/wVSkg68k" |
| Xref | csiph.com comp.lang.php:8738 |
Show key headers only | View raw
On 2013-03-18, nag <visitnag@gmail.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++
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
validation of a text box input... nag <visitnag@gmail.com> - 2013-03-18 08:46 -0700
Re: validation of a text box input... Salvatore <sal@yojimbo.hack.invalid> - 2013-03-18 18:19 +0000
Re: validation of a text box input... nag <visitnag@gmail.com> - 2013-03-18 16:54 -0700
Re: validation of a text box input... Salvatore <sal@yojimbo.hack.invalid> - 2013-03-19 16:13 +0000
Re: validation of a text box input... "J.O. Aho" <user@example.net> - 2013-03-18 20:28 +0100
csiph-web