Reputation: 1436
i have a problem with my form, this is script of my form
<form method='GET' action=''>
<table>
<tr>
<td>Enter username </td>
<td>:</td>
<td><input type='text' name='user'></td>
</tr>
</table>
</form>
that form is redirect to SELF, and this my .htaccess file:
RewriteRule ^admin/borrow$ admin/index.php?p=cpanel&m=manageBorrow [L]
but it showing undefined index for user variable,
anyone can help me solve it ?
thanks
Upvotes: 2
Views: 746
Reputation: 76666
From the documentation:
When the replacement URI contains a query string, the default behavior of
RewriteRule
is to discard the existing query string, and replace it with the newly generated one. Using the[QSA]
flag causes the query strings to be combined.
So to have the query strings appended, add in the QSA
flags, like so:
RewriteRule ^admin/borrow$ admin/index.php?p=cpanel&m=manageBorrow [QSA,L]
Upvotes: 1