[thelist] PHP Form Elements

Tim Fountain tim at incutio.com
Tue Aug 19 06:54:41 CDT 2003


Tuesday, August 19, 2003, 12:38:41 PM, bread_man wrote:

> Form works great on my windows IIS4 development server.. I upload it
> to my client's 'nix hosting server and it doesn't work. First of
> all, they have error reporting turned off which sucks.

You may be able to override their error reporting value by setting a
PHP flag in a htaccess file.  Otherwise you can set the error
reporting value by way of the error_reporting() function (try
error_reporting(E_ALL);).

> However, the main problem is that the form doesn't seem to pick up
> ANY of the form fields when on the production server.

> /register.php?name=adam  (action="register.php" method="post")

> print "Name value is " . $_POST['name'];

> ...will return "Name value is adam" on my development server, but
> will return "Name value is " on the production server.

Do you have a field called 'name' in your form?  If not, the above
shouldn't work on either.  If the only way you're passing in the name
value is via. the query string in the URL, you should be accessing it
using $_GET['name'].  The $_POST array is only for data submitted via.
post from the actual form.

-- 
Tim Fountain | Web developer | Incutio Limited | www.incutio.com
email: tim at incutio.com | Tel: +44 8708 700 333 | Fax: +44 7092 181 581



More information about the thelist mailing list