Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI and variable type

Status
Not open for further replies.

samesale

Programmer
Sep 15, 2003
133
0
0
US
I am trying to match two variables. However, I send one as text variable, the other is read from a file. Both are numbers but they do not compare. Is there a way to determine whether they are text or numeric variables? Is there a way to make both as numeric in the program where they are compared.
 
Please post your code, it is most likely an issue on the way you're testing these variables.

- Rieekan
 
The one from the file probably has a line feed on the end, did you 'chop' it after you read it?
 
How are you determining equality? Sometimes you use 'eq' and sometimes you use '='. Depends on the variable type.

There's always a better way. The fun is trying to find it!
 
Thanks, I should have taught of the difference between = and eq. It worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top