943,717 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 698
  • PHP RSS
Nov 28th, 2008
0

Passing form data to default file of a directory

Expand Post »
I want to pass my form data to default file of a directory.

For eg:-

My default file for a directory is "Default.php".
If i give,

<form action="Directory">
</form>

, then the form data should be passed to "Default.php".

Is this possible ??

If so how ??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nishant52 is offline Offline
21 posts
since Oct 2008
Nov 29th, 2008
0

Re: Passing form data to default file of a directory

You could always use apache's mod_rewrite, so forward all requests for http://www.example.com/directory/ to http://www.example.com/directory/default.php.
You'd need to add one for each directory though I think.

And it may be worth adding a parameter on the URL such as ?form so that you can distinguish between form submissions and normal page accesses if default.php serves a page to users without form submissions.


R
Reputation Points: 101
Solved Threads: 74
Posting Pro in Training
blocblue is offline Offline
427 posts
since Jan 2008
Nov 30th, 2008
0

Re: Passing form data to default file of a directory

hi, i will give you example:
<form name="form" method="POST" action="default.php">
if there any problem please tell me.
Reputation Points: 10
Solved Threads: 0
Light Poster
almualim is offline Offline
28 posts
since May 2008
Dec 2nd, 2008
0

Re: Passing form data to default file of a directory

if you already change the default file for that folder using mod_rewrite, i think you can just use the directory name as a value inside the action. You don't need to include the default.php anymore.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
xarz is offline Offline
24 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: please help
Next Thread in PHP Forum Timeline: search from database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC