Is ther a posibility to send variables back to same page. With php_self?
I have a form, that has a send button (hehe) but the inserted values have to be send to the same page back again. it works like some kind of refresh.
doe I have to do it like this then or do I have to use php_self?
<form method="post" action="php_self">?
or
<form method="post" action="the name of this page.php">?
witch one is beter to use?
Thenk for you help, Skywalker
Is ther a posibility to send variables back to same page....
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- Heavy
- Forum Contributor
- Posts: 478
- Joined: Sun Sep 22, 2002 7:36 am
- Location: Viksjöfors, Hälsingland, Sweden
- Contact:
Re: Is ther a posibility to send variables back to same page
Most people understand, but for other newbies, like me, let's correct the above:Skywalker wrote:Code: Select all
<form method="post" action="php_self">
Code: Select all
<form method="post" action="<?=$_SERVERї'PHP_SELF']?>">- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Don't forget that not everybody has short tags (<? ?>) enabled so for newbies it's good to point out:
too.
Mac
Code: Select all
<form method="post" action="<?php echo $_SERVERї'PHP_SELF']; ?>">Mac
most browsers (all I got to know until now) will send back the data to the same url if the action-property is missing, e.g.It works but does not comply to any
standard and http://validator.w3.org/check will not approve the document 
Code: Select all
<form method="POST">
<input type="submit" name="submit" value="true" />
</form>