Forum Moderators: coopster
I'll go into a bit more detail here.
People can reccomend another users page, for example if I recommend name2 then in name2's row under 'recusers' it will record my name aswell as everyone elses who has already reccomended it. For this I used:
$insertname = "UPDATE users SET recusers='$vusername - $recusersr' WHERE username='$requsername'";
mysql_query($insertname); $recusersr being all the names that were already there.
Would you be able to give me an example of that explode, or direct me to where I could find more information as I'm relatively knew to PHP and only know the basics.
Thanks.
[edited by: Jeigh at 8:02 am (utc) on July 13, 2007]
$name['nameiwant'];
But it won't let me do this:
$name[$vusername];
$vusername being $_SESSION['username']
But if I use a variable just like $var = 'Jeigh'; it does work, just not with $_SESSION['username'].
How would I be able to get it so it displays the username of the session in $name[''].
Thanks again.
[edited by: Jeigh at 9:39 am (utc) on July 13, 2007]
If I use $name['george'] and there is no george there it will result in it being blank so I'll use:
if($sessionname == "")
{
*proceed with script*
}
else
{
echo "Sorry, you have already recommended this user"
}
So I need a way to get the sessions username to work in the
$name['$vusername'] but as I said it's not working for some reason. I'm assuming because that would be the same as $name['$_SESSION['username']'] which dosn't really look right (as far as I know :P)