I want to call a .php file for the html form but it should not be mentioned in the action tag
eg: <form name="f1" method="post" action="test.php">
now, i want this action tag to be empty but still call the same test.php file from some other place....is it possible?
Calling php file from outside of action tag
Moderator: General Moderators
-
indian98476
- Forum Commoner
- Posts: 78
- Joined: Tue Dec 15, 2009 3:24 am
Re: Calling php file from outside of action tag
If you include the PHP file you want in the PHP file mentioned in the form's action, it'll work.
So
visible.php
hidden.php
So
Code: Select all
<form name="f1" method="post" action="visible.php">Code: Select all
<?php include "hidden.php"; ?>Code: Select all
<?php
// whatever you want-
indian98476
- Forum Commoner
- Posts: 78
- Joined: Tue Dec 15, 2009 3:24 am
Re: Calling php file from outside of action tag
isn't it now like a call to one file after another? i was looking for something like placing it in the same html form....
-
indian98476
- Forum Commoner
- Posts: 78
- Joined: Tue Dec 15, 2009 3:24 am
Re: Calling php file from outside of action tag
or maybe anywhere else in the php also....i know your method works well....but i am looking for these other alternatives...a guy just popped up this question 2 me and it was like 'oh! i never thot of it this way'