Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
file:///Users/jack/Desktop/Tester/login.php?login=yes

Others in have eluded to this, so I'll ask you straight out: Is this really your document root in MAMP? Sounds to me like you're by-passing MAMP altogher and your PHP code is not being parsed.

If you want to use MAMP's PHP install (and Apache and MySQL for that matter), you need to place your files in the document root or a sub folder thereof. Then point your browser to http://localhost:8888/.

You can change the document root MAMP uses in MAMP > Prefernces > Apache.
 
Agreed, nuxx.

On a side note, the OP can confirm PHP is being processed with a simple echo "Hello World"; and next time, it's easier to simply use the phpinfo() function which is the same thing as looking in php.ini, just alot faster and easier. If the user was advised to do that once they said they saw a blank screen and the other syntax errors were resolved, if a hello world or phpinfo() doesn't display, it's a server setup issue with PHP.

OP, I advise enabling display_errors=On in the php.ini as this is your development platform, restart Apache, and use Angelwatt's last incarnation of your script as it resolves the previous syntax issues discussed here and also represents all our suggestions into an improved script. For example, the method you originally used to query the username and so on would have a serious impact on performance.

-jim
 
Quick note to those following the thread. There was actually a thread merge at post 7-ish (where there's a seemingly random post about it being all new code). At that point, new code was being worked from. There was confusion as to whether the OP started a new thread for the same topic and the mods merged before the OP could clarify. So, ignore posts before 7 for the current issue.
 
Thanks everybody :D After setting mamp up right on my iBook and spending the evening doing another log in script it all works fine :D So Thanks everyone for your help.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.