On Mon, Jun 10, 2002 at 04:16:48PM -0600, Bill Hudspeth wrote:
> I am using the O'Reilly "Programming PHP" manual, and have copied the code
> from Example 7.3, p. 166.

You didn't copy it correctly.  See below.

> I have the magic_quotes_gpc set to ON in php.ini
> (though toggling between on and off doesn't seem to have any effect).

Because you'll only see a difference if your submission has something in 
it that needs to be escaped.  For example ' " will have slashes added to 

> <input type="text" name="fahrenheit' />

That needs to be a " not a '  -------^
Also, notice there's no value attribute, so that's why you found in your 
other script that this field gets cleared out all the time.

> <input type="submit" name="Convert to Celsius!" />
By the way, allow me to point something out that doesn't have anything to
do with your script not working, but may come in helpful in the future.  
You mean "value" not "name."  Name is what the name of the variable
becomes.  Value is the data that the variable holds and what's visible
when you look at the form in your web browser.  I suspect the button is
supposed to say "Convert to Celsius!" in it rather than the default
"Submit Query."



               PHP classes that make web design easier
        SQL Solution  |   Layout Solution   |  Form Solution  | |
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to