Passing form data to default file of a directory

Reply

Join Date: Oct 2008
Posts: 20
Reputation: nishant52 is an unknown quantity at this point 
Solved Threads: 0
nishant52 nishant52 is offline Offline
Newbie Poster

Passing form data to default file of a directory

 
0
  #1
Nov 28th, 2008
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 ??
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 139
Reputation: robothy is an unknown quantity at this point 
Solved Threads: 19
robothy robothy is offline Offline
Junior Poster

Re: Passing form data to default file of a directory

 
0
  #2
Nov 29th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 28
Reputation: almualim is an unknown quantity at this point 
Solved Threads: 0
almualim almualim is offline Offline
Light Poster

Re: Passing form data to default file of a directory

 
0
  #3
Nov 30th, 2008
hi, i will give you example:
<form name="form" method="POST" action="default.php">
if there any problem please tell me.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 24
Reputation: xarz is an unknown quantity at this point 
Solved Threads: 1
xarz's Avatar
xarz xarz is offline Offline
Newbie Poster

Re: Passing form data to default file of a directory

 
0
  #4
Dec 2nd, 2008
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.
:: xarz ::
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC