Jump to content

Telling a forms' action method the current page the user is on?


Solarpitch

Recommended Posts

Hey guys,

 

I am looking for a form to execute on what ever page the user preforms the action. I have a template that contains the below snippet.

 

The below snippet will be called in every page . . ie index.php, about.php . . . When the user clicks submit the action will be the URL that the user is currently at so if the user is on "index.php" the code will put action as index.php

 

echo '<form name="form1" method="post" action="index.php">';

 

I thought it was something like below but doesnt seem to work...

 

echo '<form name="form1" method="post" action="./">';

 

 

 

Cheers,

Gerard

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.