F
face2six
Guest
I am a developer dealing with migrating a stie to HOST using PLESK 7.4
For some reason the HOST admin is unable/incapable of setting up the PHP correctly
or is it that PLESK just hoses it from the start. I dunno
All I know is i can not properly submit an array thru a form
here is a simple test code that works on every other PHP linux box I use and it works fine on all but not on the PLESK server
<?php
if ( isset($_POST['doit'])Or isset($_GET['doit'])){
echo"var_dump() is: <br>";
$Formfield = $_POST['Formfield'];
var_dump($Formfield);
echo $_POST['word'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>M-array test</title>
</head><body>
<br />
<form action="arraytest.php" method="post" enctype="multipart/form-data" >
<input type="hidden" name="Formfield[parentarray][index0]" value="a">
<input type="hidden" name="Formfield[parentarray][index1]"value="b">
<input type="hidden" name="Formfield[parentarray][index2]" value="c">
<input type="hidden" name="Formfield[parentarray][index3]" value="d">
<input type="hidden" name="word" value="string">
<input name="doit" type="submit" value="doit" />
</form>
<br /><br />
when submitted the var_dump() should be:<br />
array(1) { ["parentarray"]=> array(4) { ["index0"]=> string(1) "a" ["index1"]=> string(1) "b" ["index2"]=> string(1) "c" ["index3"]=> string(1) "d" } }
</body>
</html>
So try it out on your own PLESK. See if it works, If so please let me know how you set it up so I can straighten this **** out
thanks
regards,
frustrated
PS I am aware that register_globals is off and use $_POST to access the array sent from the form
For some reason the HOST admin is unable/incapable of setting up the PHP correctly
or is it that PLESK just hoses it from the start. I dunno
All I know is i can not properly submit an array thru a form
here is a simple test code that works on every other PHP linux box I use and it works fine on all but not on the PLESK server
<?php
if ( isset($_POST['doit'])Or isset($_GET['doit'])){
echo"var_dump() is: <br>";
$Formfield = $_POST['Formfield'];
var_dump($Formfield);
echo $_POST['word'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>M-array test</title>
</head><body>
<br />
<form action="arraytest.php" method="post" enctype="multipart/form-data" >
<input type="hidden" name="Formfield[parentarray][index0]" value="a">
<input type="hidden" name="Formfield[parentarray][index1]"value="b">
<input type="hidden" name="Formfield[parentarray][index2]" value="c">
<input type="hidden" name="Formfield[parentarray][index3]" value="d">
<input type="hidden" name="word" value="string">
<input name="doit" type="submit" value="doit" />
</form>
<br /><br />
when submitted the var_dump() should be:<br />
array(1) { ["parentarray"]=> array(4) { ["index0"]=> string(1) "a" ["index1"]=> string(1) "b" ["index2"]=> string(1) "c" ["index3"]=> string(1) "d" } }
</body>
</html>
So try it out on your own PLESK. See if it works, If so please let me know how you set it up so I can straighten this **** out
thanks
regards,
frustrated
PS I am aware that register_globals is off and use $_POST to access the array sent from the form