xbl1 Posted August 13, 2007 Share Posted August 13, 2007 Hi;I want to create a dynamic URL by using mod_rewrite, to let user post their thread like this forum does.And i want to rewrite my all request as following:code:domain.com/form and Mod_Rewrite -> domain.com/index.php?topic=form and Mod_RewriteIn the .htaccess file, i wrote the rewite rule as following:RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.+)?$ index.php?name1=$1 [L]But the problem for me is after a user type his topic for his new thread, how i get the value of the topic and put it into action, let the action="value of the topic". For example, if the value of the topic is "how to use mod_rewrite", then i want the action="how to use mod_rewrite".Could anybody give me some idea how to do that by php. Thanks <html><body><form name="input" action="????????" method="get"> <input type="text" name="topic" value="type your topic here" size="20"><br><textarea rows="10" cols="30"> Type your massage here </textarea><br><input type="submit" value="Submit"></form></body></html> Link to comment Share on other sites More sharing options...
justsomeguy Posted August 13, 2007 Share Posted August 13, 2007 You can't use PHP to change a form's action dynamically. Link to comment Share on other sites More sharing options...
xbl1 Posted August 13, 2007 Author Share Posted August 13, 2007 You can't use PHP to change a form's action dynamically.do you known what i can use? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 13, 2007 Share Posted August 13, 2007 Javascript can dynamically change things on the client. Link to comment Share on other sites More sharing options...
xbl1 Posted August 14, 2007 Author Share Posted August 14, 2007 Javascript can dynamically change things on the client.Thanks a lot. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.