Computing.Net > Forums > Web Development > Simple PHP script error

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Simple PHP script error

Reply to Message Icon

Name: Roccer
Date: March 8, 2004 at 20:30:31 Pacific
OS: xp
CPU/Ram: 2500/512
Comment:

This is incredibly frustrating. I have written several scripts but there is something about my latest that just doesn't work. I have stripped it down to a retarded level and it still won't run. This is the html form:

<form method="post" action="add.php">

Password:
<input type="text" name="pass">


<input type="submit" name="Submit" value="Submit">
</p>
</form>

I then get a parse error for the correct php file in line that contains the "if" statement:

<?php
if ( &pass == "fargo" )
{print "works";}
else
{print "Wrong password.";}
?>

Please, someone with less tired eyes tell me what the hell I have done wrong.

Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: Khalid
Date: March 8, 2004 at 22:36:55 Pacific
Reply:

$pass

instead of &pass?


0

Response Number 2
Name: Roccer
Date: March 9, 2004 at 05:20:14 Pacific
Reply:

Good God, thank you. I new fresh eyes would catch something simple. I was staring at that for an hour.

Thank you so much.


0

Response Number 3
Name: Khalid
Date: March 9, 2004 at 08:04:04 Pacific
Reply:

You're welcome.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Simple PHP script error

Simple PHP Validation script www.computing.net/answers/webdevel/simple-php-validation-script/2729.html

PHP geturl error www.computing.net/answers/webdevel/php-geturl-error/3716.html

PHP scripts set-up www.computing.net/answers/webdevel/php-scripts-setup/902.html