http://example.com?param1=foo¶m2=bar
), типично при клике на ссылку. <?php
session_start();
....
....
foreach($arr as $key=>$val(){
...
}
// Здесь у вас уже готов набор переменных из массива
?>
<!DOCTYPE html>
...
....
<title><?php echo $title; ?></title>
header("HTTP/1.0 200 OK");
query("INSERT INTO main (`id`, `msg`) VALUES (NULL, '$msgs')");
....
query("INSERT INTO main (`id`, `msg`) VALUES (NULL, '$msgs')");
Cookies will not become visible until the next loading of a page that the cookie should be visible for. To test if a cookie was successfully set, check for the cookie on a next loading page before the cookie expires. Expire time is set via the expire parameter. A nice way to debug the existence of cookies is by simply calling print_r($_COOKIE);.