i cant understand this`

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
phpcoder
Forum Contributor
Posts: 158
Joined: Sat Nov 02, 2002 1:18 pm
Location: Manchester, UK

i cant understand this`

Post by phpcoder »

What does it means if i have form tag like this one
<form name="myform" action="." method="post">
what does "." means in action plz help
User avatar
mcsleazycrisps
Forum Newbie
Posts: 6
Joined: Mon Aug 25, 2003 7:12 am
Location: UK

Post by mcsleazycrisps »

The form will send the input to the "default" script for that directory

so if you had "index.php" and "form.php" and "form.php" had a <form> with "." as the action, the form will be sent to "index.php"

this could be "index.html", "index.php" or whatever the default file is.

If that makes sense :)
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Well, if omitted, it will send it's $_POST back to the same page it was sendt from.

FooBar.php
<form method="post">
<input type="submit" value="Send it">
</form>

...will upon clicking it, send you back to FooBar.php.
Post Reply