...

if...

sjc_unique
08-10-2002, 10:46 PM
Right, am very new to this and started a little project.

I have a page http://www.mediresponse.co.uk/golf.php

you need to enter a username to enter, but no password is needed.

what i want to use the username for is....the table that is then shown after hitting submit to be affected. So if $username was Jedi, then the array $golfer[0] would be made bold when used on the page.

below is what i have tried. it doesnt seem to do anything, so was wondering also where in the page it needs to be, bearing in mind the page also starts with if (!submit) so there are 2 pages in one.



<?php
if($username=="Jedi"){
echo "<b>" .$golfer[0]. "</b>";
}
?>


thanks

SJC

mordred
08-10-2002, 10:58 PM
Your input field is named "Username", not "username". That results in $Username, not $username, if I'm not mistaken.
Generally, in PHP all variables are case-sensitive, wheras function names aren't. Don't know why actually.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum