2

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

Mamen
  • 1,322
  • 5
  • 21
  • 44

1 Answers1

1

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]
Amal Murali
  • 75,622
  • 18
  • 128
  • 150