HELP: I got a "Parse error" when try to get data from form

This is a discussion on HELP: I got a "Parse error" when try to get data from form within the PHP Language forums, part of the PHP Programming Forums category; I got a "Parse error: parse error in ..." in this line: if(empty($_POST['ssn']){ ..... But if I ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-30-2003
Steven
 
Posts: n/a
Default HELP: I got a "Parse error" when try to get data from form

I got a "Parse error: parse error in ..." in this line:

if(empty($_POST['ssn']){
.....

But if I fist assign $ssn=$_POST['ssn']; and then if(empty($ssn){ ... it is
working.

Any advice? Thanks in advance.

Reards,
-Steven


Reply With Quote
  #2 (permalink)  
Old 06-30-2003
Marcus
 
Posts: n/a
Default Re: I got a "Parse error" when try to get data from form

So it still isn't working?



Steven wrote:
> The error I got is:
>
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> `T_NUM_STRING'
>
> Thanks.
>
> "Steven" <xueming@attbi.com> wrote in message
> news:oqRLa.61294$R73.8171@sccrnsc04...
>
>>I got a "Parse error: parse error in ..." in this line:
>>
>> if(empty($_POST['ssn']){
>>....
>>
>>But if I fist assign $ssn=$_POST['ssn']; and then if(empty($ssn){ ... it

>
> is
>
>>working.
>>
>>Any advice? Thanks in advance.
>>
>>Reards,
>>-Steven
>>
>>

>
>
>


Reply With Quote
  #3 (permalink)  
Old 06-30-2003
Steven
 
Posts: n/a
Default Re: I got a "Parse error" when try to get data from form

Thanks !! My first post is a typo (missing the parenthesis ). But I just
make it work by using double quote for ssn:

if(empty($_POST["ssn"])){
....

The single quote will work if I assign the variable first, but won't work if
I don't. But it is working fine now with the double quote... Some kind of
type casting ?

-Regards,
Steven


"Marcus" <JumpMan222@aol.com> wrote in message
news:3EFFE55B.7080007@aol.com...
> So it still isn't working?
>
>
>
> Steven wrote:
> > The error I got is:
> >
> > Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> > `T_NUM_STRING'
> >
> > Thanks.
> >
> > "Steven" <xueming@attbi.com> wrote in message
> > news:oqRLa.61294$R73.8171@sccrnsc04...
> >
> >>I got a "Parse error: parse error in ..." in this line:
> >>
> >> if(empty($_POST['ssn']){
> >>....
> >>
> >>But if I fist assign $ssn=$_POST['ssn']; and then if(empty($ssn){ ... it

> >
> > is
> >
> >>working.
> >>
> >>Any advice? Thanks in advance.
> >>
> >>Reards,
> >>-Steven
> >>
> >>

> >
> >
> >

>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:32 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0