php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4477 Form fields not present as variables after submit
Submitted: 2000-05-17 09:50 UTC Modified: 2000-05-29 12:15 UTC
From: zdoorduy at xs4all dot nl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Release Candidate 2 OS: Windows 2000 Prof.
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zdoorduy at xs4all dot nl
New email:
PHP Version: OS:

 

 [2000-05-17 09:50 UTC] zdoorduy at xs4all dot nl
System: PIII 550, Win2K Prof. 128 mb. IIS5, MySQL shareware 3.22.34, PHP 4.0rc2

After a form submit through either a get or post, the form variables are empty.

form:
<form action=submitform.php method=GET>
First Name: <input type=text name=first_name size=25 maxlength=25>
Last Name: <input type=text name=last_name size=25 maxlength=25>
<p>
<input type=submit>
</form>

and submitform.php contains:
<?php 

  mysql_connect ('10.1. . ', '', '');
  mysql_select_db (testbase);
  mysql_query ("INSERT INTO names (first_name, last_name) 
       VALUES ('$first_name', '$last_name')
       ");

  print ($first_name);
  print (" ");
  print ($last_name);
  print ("<p>");
  print ("Thanks for submitting your name.");
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-29 11:57 UTC] zdoorduy at xs4all dot nl
The problem persists in the release version (php 4.0.0).
 [2000-05-29 12:15 UTC] zdoorduy at xs4all dot nl
The solution turns out to be very simple: as described in #4442.
Just enable register_globals in the php.ini configuration file.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 21:01:26 2024 UTC