php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16574 Accessing Data from HTML page using post method
Submitted: 2002-04-12 13:45 UTC Modified: 2002-04-12 14:16 UTC
From: afagundes at slb dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.1.2 OS: Win95 WinNT4.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: afagundes at slb dot com
New email:
PHP Version: OS:

 

 [2002-04-12 13:45 UTC] afagundes at slb dot com
Ok, i'm trying to access data from a html page using the method post and php file. It works perfectly, but usually a have problems with the variable names.
For example, i have a text field in a html page and i want to pass the information typed in that text field to a php file, because i need to manipulate this data from the text field. That text field i called tf_project the html page index.html and the php file script.php.
Ok, when i click on the html button to pass the data I'm supposed to be capable to access the data just accessing the $tf_project variable in the php script that the post method called. The method post you can invoke using the html tag in html file like that:
<form name="form1" method="post" action="../php/script.php">
Then, the problem that i'm reporting is, in the php script the  $tf_project variable value is empty, but it's supposed to store the value passed from the html text field. If i change the text's field name to textproject and try to access the value again in the php script using now $textproject it works. I tough it was a php limitation with the "_" character to name variables, but in another situation i was using text filed name =  project and php variable $project, then i had the same problem again, i just changed the names to title1 and $title1 and my php script worked perfectly!!
I'm using the php4.1.1 and win95 for development, i executed the same test in winnt and with php4.1.2 in the both operational systems, the same problem occurred again.
I made these simple examples just to verify the same problem that i always have in my php applications when i use html and php.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-12 14:16 UTC] cynic@php.net
Please do not submit the same bug more than once.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 22 21:01:24 2023 UTC