php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26958 html form value="<?echo "$var_name";>" undefine variable $var_name
Submitted: 2004-01-18 18:22 UTC Modified: 2004-01-18 18:38 UTC
From: rrubio at wideline dot com dot au Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.3.4 OS: XP Professional
Private report: No CVE-ID: None
 [2004-01-18 18:22 UTC] rrubio at wideline dot com dot au
Description:
------------
I have an HTML form, where i would like to <? echo "$varname"; ?> to the actual input fields "value=" once submitted. On load of form $varname = "". I receive the following message "Notice Undefined Variable varname". I am using IIS 5.1 and have changed "register_globals = On".

NOTE: The same form works perfectly under PHP 4.1.5, win 2000 professional/PWS.

Reproduce code:
---------------
<?php
if($submit == "find"){
    function_name();
}
?>
<html>
<body>

<form="formname" method="get" action="file.php">
    <input type="text" name="fname" value="<? echo "$fname"; ?> ">
</form>

</body>
</html>

Expected result:
----------------
Once the form is submitted to "find" the $varname would be populated with a value, to then display on the fields actual value="". To update and so forth.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-18 18:28 UTC] sniper@php.net
The php.ini file is not being read by PHP for some reason, 
most likely it's in wrong place. See phpinfo() for the path where it's been loaded from.

 [2004-01-18 18:38 UTC] rrubio at wideline dot com dot au
The "php.ini" path from phpinfo() reads the following "Configuration File (php.ini) Path  C:\WINDOWS\php.ini"
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 10:01:29 2024 UTC