PHP net, Zend, .... Doc's looked at - still no idea whats wrong.
I need the following to be executed:
page1.php
- has a form
- form is submitted by POST to page2.php
page2.php
- has to take the data and create variables
- connect to mysql DB and perform a query
- check if mysql_num_rows == 1
- create a variable $result1 - that contains $username, $password, $id of the user
- to SETCOOKIE with the permision to be visible in all directories on only my site ( currently it's tested on the localhost )
- to forward the user ( Header() method ) back to the page which the user tried to access
NOW all of this I built and it works pefectly - exept that my blasted computer does not create a cookie. One of the following occurs:
- Cookie ( value ) doesn't shows anywhere
- Sometimes ( randomly ) it can show, but only if I don't put anything for the directory and domain ( to lock the cookie to it ) and then I can access it only in that folder ( as the cookie default )
Here is my cookie code:
Code: Select all
$value = "some usernames, passwords and id's delimited by a comma";
setcookie("nice-cake", $value, time(), "/", "localhost");Also - how do I check for physical existence of the cookie - read something that cookie may not report error, but also might not be sent to the user.
Can anyone help me with this stup.. problem.
Greatly appreciated.
Testing machine spec's:
OS: WinXP
Server: Apache 1.29.xx
PHP: with Zend enabler - I think 4.xx - something
DB: MySQL 4.1.11
And because of the Zend software I can't find php.ini anywhere on my computer, anyone has a solution to this one !?!?