View Single Post
Old August 30th, 2003, 02:06 PM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

One immediate problem that I can see is that you need to have all of your array strings quoted. The reason for this is an unquoted array string will be first assumed a defined constant and in the following PHP will try to find a constant named 'type' if one is not found PHP will assume this an unquoted string and issue a warning under error reporting E_ALL. Needless to say this isn't a very good idea.

See also:

if ($font[type]) echo "face=$font[type] ";
   if ($font[size]) echo "size=$font[size] ";

And with writing an equivilent expression for:
setcookie ("font[type]", $type_sel, time()+3600);

This should now be available in the following variable:

Again, don't use the deprecated GLOBAL arrays (i.e. HTTP_*_VARS), use the new superglobal array equivalents. That is unless you're stuck with using PHP earlier than 4.1. In which case I would strongly suggest designing a work around yourself to support the new method, (i.e... $_COOKIE = $HTTP_COOKIE_VARS; $_POST = $HTTP_POST_VARS;).

See also:

: )

Smiling Souls