php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16887 PHP difficulties in getting and using values from HTTP post and get forms
Submitted: 2002-04-28 13:26 UTC Modified: 2002-04-28 13:53 UTC
From: ben at wwwtools dot com Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.2.0 OS: Debian 2.2
Private report: No CVE-ID: None
 [2002-04-28 13:26 UTC] ben at wwwtools dot com
I have just recently installed Apache 1.3.24 and PHP 4.2.0 on a Debian 2.2 system. I had an identical installation beforehand, and it worked fine.

I wish to use HTML forms to submit data for entry into a MySQL database. PHP won't inherit the values from forms, and displays them as NULL or of blank value.

For instance, I created two files named test.htm and test.php. Test.htm looked like this:

<head>
<title>Test</title>
</head>

<body>
<form method="get" action="test.php">
<input type="text" value="" name="textfield">
<input type="submit" value="Submit">
</form>
</body>

</html>

And test.php looked like this:

<? echo "The value of textfield is: " . $textfield ?>

I would expect that since test.php is the action of the form, then $textfield would echo the value that the user entered in the text box. Instead, I get the following output:

The value of textfield is: 

I'm not sure if this is a problem with PHP or Apache. Any help that can be offered would be greatly appreciated.

Thanks!
Ben Willett

P.S. The files mentioned in this report can be found at http://www.bz0ne.net/test .

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-28 13:36 UTC] mfischer@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 [2002-04-28 13:53 UTC] ben at wwwtools dot com
My mistake. I had to edit php.ini to set file_uploads to On.

Thanks anyways.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 23:01:31 2024 UTC