The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
I've never got on very well with these. The JavaScript versions are just a pain, but I've heard that the PHP equivalent are much easier to manage. So, plain English please - how do I set and retrieve a simple cookie to store a username and password for a PHP forum?
2) The & operator
I should just try this out really, but can't be bothered with all that uploading! All I want to do is perform 2 "file_Exists" checks, and if they do, it sets a variable for each to "yes", and then I run an:
if(thisvariable=="yes" & thatvariable="yes")
{ action }
else
{ alternative action }
Is that the right syntax? Does PHP do this basic function?
Simple questions really, but I'd rather someone flexed their coding muscles here than elsewhere :P
Once I've got these sorted I'll have a PHP forum that's more or less the same system as SR's!
This is a good tutorial on authentication in PHP, from which you can glean how to set and read cookies.
> if(thisvariable=="yes" & thatvariable="yes")
> { action }
> else
> { alternative action }
You need a double &&, or just use the word "and".
> Is that the right syntax? Does PHP do this basic function?
PHP is one of the best languages out there.
As for cookies, read php.net/setcookie
I've never got on very well with these. The JavaScript versions are just a pain, but I've heard that the PHP equivalent are much easier to manage. So, plain English please - how do I set and retrieve a simple cookie to store a username and password for a PHP forum?
2) The & operator
I should just try this out really, but can't be bothered with all that uploading! All I want to do is perform 2 "file_Exists" checks, and if they do, it sets a variable for each to "yes", and then I run an:
if(thisvariable=="yes" & thatvariable="yes")
{ action }
else
{ alternative action }
Is that the right syntax? Does PHP do this basic function?
Simple questions really, but I'd rather someone flexed their coding muscles here than elsewhere :P
Once I've got these sorted I'll have a PHP forum that's more or less the same system as SR's!