Forum Moderators: coopster

Message Too Old, No Replies

What is happening at submitting?

Refreshing and setting post or get?

         

rokec

10:07 pm on Sep 9, 2006 (gmt 0)

10+ Year Member



What is happening at submitting a form? Does the page refreshes?

spinnercee

4:39 am on Sep 10, 2006 (gmt 0)

10+ Year Member



When you create a form it has a ACTION URL that should return something, otherwise the form page will remain.

Methods GET and POST determine how the form data is sent -- With GET, they are sent as the query string part of the URL ie:?item1=nnnn&item2=yyyy&itemN=999999 etc. POST sends the data as part of the request body, they are not visible in the URL, but are retrieved through the same strings in PHP like $_REQUEST[item1].

pixeltierra

7:56 am on Sep 10, 2006 (gmt 0)

10+ Year Member



To make this more clear the data from your form will be submitted to the very same page it resides in unless you specify an ACTION, which is a script that receives the data:

<form action="myscript.php" method="post">

If you want the same page to process your data do something like this:

<?php

if ($_POST){
do stuff here...
}

?>