[FONT="Comic Sans MS"]Hi,

I want some information about the action of the form ...

action = "<? echo $post_self; ?>

Can anyone help me,please? [/FONT]

    Perhaps you are referring to $SERVER['PHP_SELF']? $SERVER['PHP_SELF'] is the URI of the current page, so making that the form action causes the form to be submitted to the current page for processing.

      Can you explain more, please ?

      we must to write PHP_SELF in the action of the current page and the other related page ?

      for example,

      If I have a field in the current page and the other page have 2 other field that I want to appear in the current page. Where I should write the PHP_SELF ? In the current page or in the other pages?

        we must to write PHP_SELF in the action of the current page and the other related page ?

        There would no other related page since the form submits to the current page.

        If I have a field in the current page and the other page have 2 other field that I want to appear in the current page. Where I should write the PHP_SELF ? In the current page or in the other pages?

        If there is an "other page", it means that you are processing the form in the "other page", so the form action should be the other page's URI, not $_SERVER['PHP_SELF'].

          Can you give me any Tutorial about PHP SELF ..

          I don't know how to apply it 🙁

          Can you, please ?!!!!!

            It is just a variable, as explained by the PHP manual's entry on $_SERVER.

            What exactly are you trying to do?

              I want to do a search form and the form has many fields ..

              when the form opens, it appears the first field which we will search about in the database .. then I click Next

              and it appears the previous field and new field and so on ..

                In that case the form's action should point to the next page, not to $_SERVER['PHP_SELF']. The next page would then save the form data in a session, so that when the form is submitted to the next next page, the data would persist. The final page would then process the search input, combining the session data with the form data from the next last page.

                  Thanks for clarification ..

                  I will try to do it ..

                    Write a Reply...