Hey,
I am using Smarty to display a html form, and the form has the same action as the page that displayed the form (admin.php).
I have the <form method="POST" action="admin.php"> but when I test for that the admin.php page is recieving the POST input using an echo, nothing echoes out.,
So what Im asking is, what path do I need to put in the action paramater for the form to post to admin.php.
And for reference:
Path to Form: /styles/timberwolf/admin/login_body.htm
Path to Display File: admin.php/
Thanks!
Relative Form Actions
Moderator: General Moderators
what does it say in the url when you post what you've currently got? That's going to be your best clue as to where the script is going.
The tpl files can be anywhere on the hard drive, they have nothing to do with relative paths (unless you specifically set something within the template itself).
if I have my admin.php file and I use:
if in that tpl file have a form with an action of admin.php, it should go straight back to the page that posted it.
check your url to see where it's going though.
The tpl files can be anywhere on the hard drive, they have nothing to do with relative paths (unless you specifically set something within the template itself).
if I have my admin.php file and I use:
Code: Select all
$smarty->display("/some/path/to/some/tpl/file/blah.tpl");check your url to see where it's going though.
When I hit submit, it refreshes the page but the issue is I do not see any of the test code I have to see if PHP is picking up on the POST var
And yes, Im sure that is the correct name for the submit button.
Thanks Burrito!
Code: Select all
if (isset($_POST['admin_login'])) {Thanks Burrito!