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!
Hi! I'm a PHP-newbie and stumbled upon a problem which is about to get me quite frustrated. What I'm attempting to write is a harmonograph capable of remembering the parameters of five previously generated figures. Drawing is done in Flash and the user interface relies on PHP. For some reason the $_SESSION appears to be empty every time I reload the page.
Session keys/indexes cannot be numeric. With error_reporting and display_errors enabled you would see a notice about "skipping numeric key" which means that the item in question will not be stored in the session. Session keys should use variable-naming conventions. The simplest solution would be to prefix the numbers with an underscore. For example: $_SESSION['_0'], $_SESSION['_1'], etc.