473,749 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 16 '05 #1
2 4109
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.6129 4$R73.8171@sccr nsc04...
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
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.6129 4$R73.8171@sccr nsc04...
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2565
by: mrwoopey | last post by:
Hi, My OLAP data cube is giving me the following error when I am manipulating OLAP data cube views: "the data being processed is over the allowed limit" I know that this message is caused by the size limit of each form field that is retrieved in the Request object is 102,399 bytes. The error occurs when I exceed this limit.
2
1734
by: Yarco | last post by:
I'm learning for docbook under win32. I download: openjade-1_3_1-2-bin docbook-xml-4.4 docbook-dsssl-1.79 ldp.dsl And then copy all openjade bin\ to win32 system\, and then create a directory share\ under my workhome. Copy openjade-dsssl, docbook-xml-4.4, docbook-dsssl-1.79 to share\. ldp.dsl into docbook-dsssl-1.79\html\.
1
1266
by: RWC | last post by:
Hello, I have a client who has just purchased a new computer with Windows XP installed. When trying to set up his Access application from a disc that he previously used to successfully set this program up, he is getting an error message about requiring NT SP4 or greater. I've tried a number of things, including stripping out the System Files from the set up profile, but with no success. I can't seem to find anything on the Microsoft...
1
1858
by: Dgates | last post by:
This request might belong in a "SQL"-related newsgroup, but it's such a pain using Agent to subscribe to a new group (and download its 50,000 messages!) just to ask one question. So, since it deals with an ASP.NET app, I thought I'd ask here. ============================================== I am using Web Data Adminstrator, which I downloaded recently from the Microsoft site. I get an error when I create tables or columns:
1
1200
by: VB Programmer | last post by:
I am making a simple VB.NET app to send emails. I put a test button on the form with code like this: Imports System.Web.Mail : Dim msgEmail As New System.Web.Mail.MailMessage With msgEmail .To = txtTestEmailAddress.Text .From = "someone@somewhere.com" .Body = "This is a test email."
0
1466
by: ksayal | last post by:
Hi, I'm creating a project. Whenever I try to add a user control or add an aspx page it gives me the following error. When I remove the inherits="" thing, it shows up the page.... What would be the cause of this problem.. Please suggest asap.. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error
2
1182
by: Gungmas | last post by:
When I trace the exection in my program the source code does not correspond to where the code is supposed to execute. When I single step the marker stops on empty lines or rows of comment also so it seems like the debug information has been corrupted in some way. I have tried to rebuild the program but it does not help. I have also not been able to set a breakpoint in a form's load event and get the program to break there, but perhaps this...
3
3697
by: keithb | last post by:
Using a GridView, I get a "Specified cast is not valid" error when binding the Visible propery of a hyperlink control to a DataTable text field. The error goes away if I replace the data binding statement with "true" or "false". This code causes the error: <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("c2Hyperlink1Link") %>' Target="_blank"
3
3636
by: JToe | last post by:
Hi, I have a sql statement which is as follows:- INSERT INTO expense(Jan) SELECT sum(ECFAmount) FROM Transaction WHERE Date BETWEEN (#01/01/2007#) AND (#01/31/2007# ) When i execute the above, I have an error like this >> java.sql.SQLException: Too few parameters. Expected 1. can someone pls suggest or advise me what can be the problem?
18
11147
by: ana10192000 | last post by:
VB6.0 Private dbParts as Database Private dbParts as Recordset guys help, i can't execute my program compiler error says: " user-defined type not defined " i'm not much a knowledgable programmer, i'm still just a student, do explain it in a little bit detailed statements. thanks!
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4709
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.