By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,939 Members | 1,600 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,939 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <xu*****@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



Jul 16 '05 #2

P: n/a
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" <Ju********@aol.com> wrote in message
news:3E**************@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" <xu*****@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


Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.