Thursday, April 24, 2014
   
Text Size
Login

How to make a HTML form post its variables to itself

The Issue

You have a PHP page which generates a HTML form.  When the user submits the form, you want the same PHP page to process the data.

Solution

I've seen a lot of people write CGI requests but if you left the action attribute blank, this would do the same thing:

 


  1.  <form method="post" action=""> 
  2.  ... 

 

Latest Posts

  • 301 Redirect using htaccess file

    • Tue 15-Apr-14
      Further suggestion:
      RewriteRule ^(.*/)?assets/s 2dmain.html\?/( .*/)? $2 [R=301,L]
      Webmaster  
    • Thu 10-Apr-14
      Playing with some RegEx testers
      RewriteRule ^(.*\?/)?(?:$|( .+?)(?:(\.[^.]$ )|$)) $2 [R=301,L] ...
      Webmaster  
    • Wed 09-Apr-14
      I tried to redirect links from my old site to my new site, based on what I read in this thread. The old ...
      pelle
  • Joes Revolver Map (JRM)

    • Tue 22-Apr-14
      Hi Manfred, Some downloaders have reported that the version of this module intended for Joomla 2.5.x ...
      Webmaster  
    • Sun 20-Apr-14
      Hello, is it possible to use this module also in joomla 3.2? Thanks Manfred
      Manfred V.