Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-07-18 20:44:30
- saturnflyer
- Member
- Registered: 2006-01-22
- Posts: 40
Grab current clean URL
I’m creating an area on my site where I’ll be updating the database with some php and I want to get the current URL.
For instance, if I go to mysite.com/data/ I want to submit a form to itself and process it on that page. I haven’t been able to figure out how to get the clean URL for the form action attribute.
I want the code to look like this
< form action=“mysite.com/data/” method=“post” >
Offline
#2 2006-07-19 00:21:01
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Grab current clean URL
<code><form action=”<txp:page_url />” method=“post”>
</code>
(http://mysite.com<txp:page_url /> will output the full url, i.e. http://mysite.com/data/)
Hey, it’s not in TextBook!
Offline
#3 2006-07-19 00:31:58
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Grab current clean URL
Also, form action="" method="post" will work, and appears to be valid.
Alex
Offline
#4 2006-07-19 01:22:48
- saturnflyer
- Member
- Registered: 2006-01-22
- Posts: 40
Re: Grab current clean URL
wow. I feel dumb. action=”“ works fine. Thanks!
Offline
Pages: 1