I have a form at index.php that takes in user input, it the includes and sends the user input to another php file for processing.
Here is the code of index.php:
<meta charset="utf-8" />
<input type="text" name="q" />
When one submits the form it goes to http://mysite.com/?q=textUserEntered (if just the domain was visited before) or http://mysite.com/index.php?q=textUserEntered (if index.php is visited before)
How can I get it to go to http://mysite.com/form?q=textUserEntered or http://mysite.com/index.php/form?q=textUserEntered while still passing the form data to form.php
I tried this in the beginning index.php and form.php, it navigates to the URL but doesn't pass the data to form.php and instead goes to a 404 error page.
I can't use the action attribute because adding form.php to the value of the action attribute would make the URL http://mysite.com/form.php?q=userEnteredText not http://mysite.com/form?q=userEnteredText