Hi guys
I'm running apache 1.3, with PHP 4.2.2 on a Win2000 box. The following short code
<HTML>
<HEAD>
<TITLE>Get column number</TITLE>
</HEAD>
<BODY>
<BR>
<BR>
<form action="get_col_names.php" "method="get">
<font face="arial" size="2" color="#1c651c">Enter column number : </font>
<input type="text" name="colno" size="3" value="0"><BR>
<input type="submit" value="Enter">
</form>
</BODY>
</HTML>
correctly passes colno in the URL to get_col_names which looks like this:
<HTML>
<HEAD>
<TITLE>Get column names</TITLE>
</HEAD>
<BODY>
<?
echo"<font face=\"arial\" size=\"2\" color=\"#1c651c\">Column number : " . $colno . "</font>" ;
?>
</BODY>
</HTML>
but this generates the following error message and returns no value in colno :
Notice: Undefined variable: colno in c:\program files\apache group\apache\htdocs\test\get_col_names.php on line 7
Running the same on another webserver the script returns the correct value with no error message. Obviously my config is different from the other webserver's??? Any aideas why??
Thanks - Fari
Undefined variable error message
Moderator: General Moderators