Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

submitting form to current page

Status
Not open for further replies.
Jul 28, 2005
358
FR
Hi,

I know (well think actually) this is possible and am sure I've done it before, but can't for the life of me remember how.

I want to submit a form to the current page. How do I do this? It needs to not have an actual url in the form as it is relies on php include files to display forms etc. that need to submit themselves to the current page.

Thanks,

Richard
 
it's alright, I knew I had done it before: just leave the action out.

Richard
 
Of course [tt]action="#"[/tt] will only put the focus at the top of the page and not submit the page. Unless you have a different way of using that.
 
It seems to work fine for me, submits the form to itself perfectly only using action="#". I suppose it's because it has a submit action on it. I know that with hyperlinks using # as the link will just go to the top of the page, but on forms it seems to submit to itself.

The pain of it was later on when I needed to have links to itself with correct varaible values passed on along with additional variables. Sorted it though usig php's $_SERVER['REQUEST_URI'] function and then adding the other variables to be passed

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top