Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8789511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:25:36+00:00 2026-06-13T22:25:36+00:00

the php page is not receiving the GET variable and is producing an undefined

  • 0

the php page is not receiving the GET variable and is producing an undefined index error for textSearch.
I’ve turned off multiviews, and added QSA as suggested in related posts.

my .htaccess looks like this

Options -MultiViews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?id=$1 [QSA,L]

The $_GET variable should be named textSearch

<form action='users/index.php' method"GET">
   <input type='text' name='textSearch'>
   <input type='submit' value='submit'>
</form>

[EDIT]
As mentioned in the comments, the form’s location is in localhost/Build_3/index.php, and is passing the ‘textSearch’ variable to localhost/Build_3/users/index.php

[EDIT]

Directory structure is as follows:
default home page is Build_3/index.php
user home page is Build_3/users/index.php

The form in Build_3/index.php is supposed to go to Build_3/users/index.php and provide the variable textSearch.
I have one .htaccess in Build_3, and one in the Build_3/users directory.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:25:39+00:00Added an answer on June 13, 2026 at 10:25 pm

    Add %{QUERY_STRING} at the end of the rule.

    Options -MultiViews
    RewriteEngine on
    RewriteRule (.*)\.dummy$ ./?page=dummy&%{QUERY_STRING} 
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)$ index.php?id=$1%{QUERY_STRING} [QSA,L]
    

    Notes:

    1. What’s that Options -MultiViews doing above?
    2. In order for RewriteRule ^(.*)$ index.php?id=$1%{QUERY_STRING} [QSA,L] to work, you need to add some dummy conditions, like I have added above.

    Update #1

    As far as I understood you, correct me if my understanding is wrong:

    1. There is a form in the Build_3/index.php, which has a post method, taking to Build_3/users/index.php. So I assume that you have the following with you:

      <form method="post" action="users/index.php">
      ...
      ...
      </form>
      
    2. You have two .htaccess files. Why is there one in the users directory? Okay, I am not sure, why you have one in the Build_3/ then. If you want the users access the URL as:

      http://Build_3/users/5
      

      And it should get redirected this way:

      http://Build_3/users/index.php?id=5
      

      Then you need to change your .htaccess file in the Build_3/users/ directory this way:

      RewriteEngine on
      RewriteRule (.*)\.dummy$ ./?page=dummy&%{QUERY_STRING} 
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-l
      RewriteRule ^(.*)$ index.php?id=$1%{QUERY_STRING} [QSA,L]
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php page server1.com/page1.php (not real) and another page server2.com/page2.php page1.php response
i have tried this code to redirect a php page.but it s not working
Okay, so I have my post.php page. If you are not logged in, you'll
I have a index.php page that is the main page. All pages are included
I want to change the php setting but from .php page not php.ini. The
I have a PHP page receiving input from an HTML form via $_POST. The
Whenever I load my external PHP page (loadTextBox.php) my variable $verb_value is never being
I am receiving the following foreach error on my PHP file and I have
I have a PHP page where i want to open a file on a
I have a PHP page that loads external content using other PHP files. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.