Page 1 of 2

method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 08:20
by zygwi
I get some values with method POST.

My XAMPP last version was 1.6.5.

I try to install the 1.7.2, but it does not work any more.

What kind of problem should I have ?

XAMPP is installed on Window Server 2003.

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 08:24
by Stepke-DSL
Can you post the code where you send the data and where you get the data?

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 09:09
by zygwi
Here is a very simple example which does not function any more :

Form1.php :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="" />
<meta name="keywords" content="design, css, style, xhtml, w3c, geremi, prevoyance" />
<meta name="description" content="tools of research for " />
<meta name="robots" content="all" />

<title>Outils de recherche </title>

<script language="Javascript" type="text/javascript">
function bValid(frm) {
if ( frm.titi.value.length != 0 ) {
window.document.forms["toto"].submit();
}
}
</script>

</head>

<body id="pilote">

<form name="toto" method="POST" action="form1_post.php">

<div id="">
<table>
<tr><td>titi</td><td><input type="text" name="titi"></td></tr>
<tr><td colspan="2"><input type="button" value="Tester" onClick="bValid(this.form)" alt=""></td></tr>
</table>
</div>

</form>

</body>
</html>


form1_post.php :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="" />
<meta name="keywords" content="design, css, style, xhtml, w3c, geremi, prevoyance" />
<meta name="description" content="tools of research for " />
<meta name="robots" content="all" />

<title>Outils de recherche </title>


</head>

<body id="pilote">

<form name="toto">

<div id="">
<table>
<tr><td>titi</td><td><input type="text" name="titi" value="<?=$_POST['titi']?>" /></td></tr>
</table>
</div>

</form>

</body>
</html>

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 09:13
by Stepke-DSL
Next time use the code-tags...

try this
Code: Select all
<form name="toto">

<div id="">
<table>
<tr><td>titi</td><td><input type="text" name="titi" value="<? echo $_POST['titi']; ?>" /></td></tr>
</table>
</div>

</form>


hope this helps

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 09:23
by zygwi
Stepke-DSL wrote:Next time use the code-tags...


:? Sorry ...

Stepke-DSL wrote:try this
Code: Select all
<form name="toto">

<div id="">
<table>
<tr><td>titi</td><td><input type="text" name="titi" value="<? echo $_POST['titi']; ?>" /></td></tr>
</table>
</div>

</form>


hope this helps


Double effects !
the first time, that functions.
But after, the POST is empty. :?:

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 10:09
by Stepke-DSL
you must specify the action and the method in form1_post.php.

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 10:14
by zygwi
Stepke-DSL wrote:you must specify the action and the method in form1_post.php.


Code: Select all
<form name="toto" method="POST" action="form1_post.php">


No effect on form1_post.php source.

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 10:27
by zygwi
for information :

The first time, it's OK, and after :
<br /><b>Notice</b>: Undefined index: titi in <b>D:\Siteweb\Informations\form1_post.php</b> on line <b>21</b><br />


The line 21 :
Code: Select all
<tr><td>titi</td><td><input type="text" name="titi" value="<?php echo $_POST['titi']; ?>" /></td></tr>

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 12:14
by Altrea
zygwi wrote:The first time, it's OK[...]

What does that mean?

POST is only filled, if the form is executed.
your Form transfers all inputted data to your other site "form1_post.php". After transfering the data and rendering of that page, your POST-Data isn't stored anymore. If you want, that this POST value is setted, you must transfer another form (or the same form like before), or find another way to store your data longer than one page loading (e.g. store your data in a SESSION)

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 12:57
by Stepke-DSL
what is the output of
Code: Select all
print_r($_POST);

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 13:02
by zygwi
Altrea wrote:
zygwi wrote:The first time, it's OK[...]

What does that mean?


At the first submit, the value is transmitted.
After, I do “preceding page” and re-submit and there is nothing. No Value transmitted.

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 13:12
by zygwi
Stepke-DSL wrote:what is the output of
Code: Select all
print_r($_POST);


Array()

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 13:25
by zygwi
I made other complementary tests.

I tested with Firefox 3.5.3, I do not have problems. Only IE 6 poses problems to me. But, i have no choice, I do used IE 6.

I tested with WAMPSERVER in the place of XAMPP, IE6 that functions.

I thus suppose that the problem comes from the file http.conf of XAMPP.

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 13:28
by Stepke-DSL
so you do not send any data at the second post...
post the code for the second sending.

Re: method POST does not function any more with version 1.7.2

PostPosted: 15. September 2009 15:53
by zygwi
I'll be come crazy !! :roll:

I suppose the problem come from IE6. With Firefox, no problem, with IE6, if I wait about 5 seconds before submit, it's ok, but if i submit immediatly after filling the form, i submit no value.

Is someone have the same problem ?