All,
The following script works as intended in MS-Windows and in other Linux
boxes, except on the one that runs php 4.3.10.
Sorry for the long post.
1) # uname -a
Linux bubba 2.4.20 #5 SMP Thu Apr 3 12:26:19 BST 2003 i686 i686 i386
GNU/Linux
2) #php -v
PHP 4.3.10 (cgi) (built: Mar 15 2005 14:36:32)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
3) Here is the script :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test form posting arrays - dynamic indexes</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"
/>
</head>
<body>
<form name="test" method="post" action="/status/test.php">
<input type="text" name="test_text[]"><br />
<input type="text" name="test_text[]"><br />
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
4) What this script is supposed to do - Show two fields on a web
browser.
But only on this specific server, it shows two fields, and if I input
data it shows me an extra data field !!. As you can see below, I used
the "View Page source" :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test form posting arrays - dynamic indexes</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"
/>
</head>
<body>
Array
(
[test_text] => Array
(
[0] => test
[1] => this
[2] => this <-- This is the error. Why is a third
array
showing up?
)
[submit] => Submit
)
<form name="test" method="post" action="/status/test.php">
<input type="text" name="test_text[]"><br />
<input type="text" name="test_text[]"><br />
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
The following script works as intended in MS-Windows and in other Linux
boxes, except on the one that runs php 4.3.10.
Sorry for the long post.
1) # uname -a
Linux bubba 2.4.20 #5 SMP Thu Apr 3 12:26:19 BST 2003 i686 i686 i386
GNU/Linux
2) #php -v
PHP 4.3.10 (cgi) (built: Mar 15 2005 14:36:32)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
3) Here is the script :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test form posting arrays - dynamic indexes</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"
/>
</head>
<body>
<form name="test" method="post" action="/status/test.php">
<input type="text" name="test_text[]"><br />
<input type="text" name="test_text[]"><br />
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
4) What this script is supposed to do - Show two fields on a web
browser.
But only on this specific server, it shows two fields, and if I input
data it shows me an extra data field !!. As you can see below, I used
the "View Page source" :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test form posting arrays - dynamic indexes</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"
/>
</head>
<body>
Array
(
[test_text] => Array
(
[0] => test
[1] => this
[2] => this <-- This is the error. Why is a third
array
showing up?
)
[submit] => Submit
)
<form name="test" method="post" action="/status/test.php">
<input type="text" name="test_text[]"><br />
<input type="text" name="test_text[]"><br />
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
Comment