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

  • SEARCH
  • Home
  • 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 8282687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:27:36+00:00 2026-06-08T10:27:36+00:00

I am struggling with a problem I have never had before. I have a

  • 0

I am struggling with a problem I have never had before. I have a form on a page that submits its data via POST to another page, but the data is not arriving at the other page. If I make action="" and then var_dump() at the top of the page with the form, the POST data prints out fine, BUT if I make action="http://localhost/dir/" and put var_dump() at the top of that page, then array empty prints out. What on earth might be causing this behavior? How do I debug this? I’m lost.

Form:

<form id="form" method="post" action="http://localhost/dir">
    <input type="hidden" name="id" value="19">
    <select style="width: 60px;" name="number">
        <option value="1">1</option><option value="2">2</option><option value="4">4</option>
    </select>

    <input type="submit" class="input_submit" value="Submit" id="submitButton">
</form>

Code at top of index.php file:

var_dump($_POST);die();
  • 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-08T10:27:40+00:00Added an answer on June 8, 2026 at 10:27 am

    To post data to a page that is on a different directory, use a relative path.

    For example, consider this. DirSub1 and DirSub2 are in the same level and they’re both within DirTop.

    • DirTop
    • DirSub1
    • DirSub2

    Now, if your form is in the directory DirSub1 and you need to post it to x.php in DirSub2, you write the action property like this:

    action=”../DirSub2/x.php”

    Hope this solves your problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been struggling with Zend_Navigation all weekend, and now I have another problem, which
Okay, so I have another question on a prolog homework problem I am struggling
There is a component that I have been using since IE7 and had never
I've been struggling with a problem that I have for days now and I
I have been struggling with a problem that at first glance might look easy
I'm new to Hibernate and I'm struggling with problem: I have 3 tables and
I am struggling with a problem in assembly, where I have to take the
I have been struggling to find a solution to this problem. In my code,
I have a question about a problem I'm struggling with. Hope you can bear
I have searched/Googled around but I'm struggling with the following problem. I am building

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.