Thanks Andy for helping out - 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>
<?php
if (isset($_POST['submit'])) {
print_r ($_POST);
}
?>
<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>
Andy Hassall wrote:
On 29 Mar 2005 12:04:51 -0800, na*****@gmail.com wrote:
The following script works as intended in MS-Windows and in other
Linuxboxes, except on the one that runs php 4.3.10.
Sorry for the long post.
3) Here is the script : [snip]
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
inputdata it shows me an extra data field !!. As you can see below, I
usedthe "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
thirdarray
showing up?
You haven't posted the code that produces this output. The code you
posted does not have any print statements, or anything that produces output.
Or if you have, it's doubly bizarre as it would have to have
magically inserted a "print_r" statement.
--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis
tool