PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm trying to make a text based RPG online, and I just want a simple script in continue.php that redirects players to 'Location'.html, which is set by a cookie named Location.
When I try to use it it just takes me to www.mysite.com/.html, which of course throws an error. The cookie does have a value, I checked, so why is it just ignoring the variable?
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
It stays on continue.php, but I know Location has a value because in the cookie editor it says it has the value of 'start', which is what it should have...
fall0utm0dd wrote:It stays on continue.php, but I know Location has a value because in the cookie editor it says it has the value of 'start', which is what it should have...
I don't have any idea what the cookie editor is, but if you echo it and it doesn't display anything, then it doesn't have a value. The problem may be where you set the cookie value. If you set it on a page then it won't be available until the next page load or refresh.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Got it working. Imbecilic tutorial template for setting a cookie didn't explain that specifying a site that it can be used on doesn't include all subdirectories.