adamriley Posted December 31, 2009 Share Posted December 31, 2009 Hi could someone tell me if this is posible what i need is for example there is a variable named ($username) what i want is to display the users name which would be ($name) there are two users all together how would you do this by doing something like "if $username == adamriley $fullname =adam lee riley else $fullname=nathan" i have tryed the above but Im new to php Im really sorry for not using the code tags but im on a mobile Quote Link to comment Share on other sites More sharing options...
oni-kun Posted January 1, 2010 Share Posted January 1, 2010 $username = 'adamriley'; if ($username == 'adamriley') { $fullname = 'adam lee riley'; } else { $fullname = 'nathan'; } That should work, your method does not seem so secure though, what are you trying to do? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.