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 6358093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:18:07+00:00 2026-05-24T23:18:07+00:00

Does this create some kind of perpetual loop or something? I’ve tried posting data,

  • 0

Does this create some kind of perpetual loop or something? I’ve tried posting data, and the page simply won’t load, the page containing the form simply keeps “loading” on form submission.

for($i = 1; $i = 5; $i++) {
    $country[$i] = $_POST['country_'.$i];
    $redirect[$i] = $_POST['redirect_'.$i];
}

var_dump($country);
var_dump($redirect);

Here’s my form;

<form action="query.php" method="post" id="geoui">
<div id="input1" class="clonedInput">
<select name="country_1" class="px460s">
<option selected="selected" value="auto">Choose country to set rule for..</option>
<option>United Kingdom</option>
<option>Canada</option>
</select>
<input name="redirect_1" type="text" class="px460" value="http://">
<div class="break"></div>
</div><div id="input2" class="clonedInput">
<select name="country_2" class="px460s">
<option selected="selected" value="auto">Choose country to set rule for..</option>
<option>United Kingdom</option>
<option>Canada</option>
</select>
<input name="redirect_2" type="text" class="px460" value="http://">
<div class="break"></div>
</div><div id="input3" class="clonedInput">
<select name="country_3" class="px460s">
<option selected="selected" value="auto">Choose country to set rule for..</option>
<option>United Kingdom</option>
<option>Canada</option>
</select>
<input name="redirect_3" type="text" class="px460" value="http://">
<div class="break"></div>
</div><div id="input4" class="clonedInput">
<select name="country_4" class="px460s">
<option selected="selected" value="auto">Choose country to set rule for..</option>
<option>United Kingdom</option>
<option>Canada</option>
</select>
<input name="redirect_4" type="text" class="px460" value="http://">
<div class="break"></div>
</div><div id="input5" class="clonedInput">
<select name="country_5" class="px460s">
<option selected="selected" value="auto">Choose country to set rule for..</option>
<option>United Kingdom</option>
<option>Canada</option>
</select>
<input name="redirect_5" type="text" class="px460" value="http://">
<div class="break"></div>
</div>
</form>

Any advice or answers would be greatly appreciated ;)!

  • 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-05-24T23:18:07+00:00Added an answer on May 24, 2026 at 11:18 pm
    for($i = 1; $i = 5; $i++) {
    

    You missed the <:

    for($i = 1; $i <= 5; $i++) {
    

    BTW you could use the array syntax for form element names, so that instead of using $_POST['country_'.$i] to access posted data, you would do $_POST['country'][$i] or $_POST[$i]['country']:

    <select name="query[1][country]" class="px460s">
    <input name="query[1][redirect]" type="text" class="px460" value="http://">
    

    Then in your PHP script:

    foreach($_POST['query'] as $item) {
        $country = $item['country'];
        $redirect = $item['redirect'];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have few question in this regard When you create an internet page, does
Does anyone have any idea what is wrong with this create statement for mysql?
This is a Function that does the following: Create a random Token with 8
How does one create Dynamic CSS and JavaScript On-The-Fly (using PHP). This needs to
Why does SQL server express 2008 give me this error? CREATE TABLE model (
Does this seem right, the dataFilePath is on disk and contains the right data,
I'm looking for a way to create some kind of value type hierarchical class
Hey there! I'm doing this project and right now I'm trying to: create some
I have a situation where I need to create some kind of uniqueness between
I'm trying to create some kind of grid layout with css: Having a content

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.