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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:52:12+00:00 2026-05-28T02:52:12+00:00

I tried this question before and did not supply enough information, so here are

  • 0

I tried this question before and did not supply enough information, so here are more details. I have a page on a hosted site asking the visitor to enter a coded string in a form. When submitted the code builds a file name and grabs some simple data from a text file.

Everything works fine in FF and Safari but when testing this in internet explorer 7 and internet explorer 8, when submitted, the visitor is redirected to the site home page.

This same unexpected redirection is happening elsewhere in the site. I am hoping if I can isolate the issue here I can fix the other instances.

Here is the code:

<?php

    session_start();
    ob_start;

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Advisor Survey - 2012 Predictive Questions</title>

<link href="css/surv_ver2.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/s_table.css" rel="stylesheet" type="text/css" media="screen" />

</head>

<body>

    <div id="header">


    </div> <!-- close header -->

    <div id="wrapper">

        <div id="mid_cont">

            <div id="mid_left">


            </div> <!-- close mid_left -->

            <div id="mid_col">

                <div id="mid_col_inner">

                <h2 class="p_head">Scoring Details</h2>
                <p class="p_text">Want to learn more about how your site compares to others in your market? We employed tools to evaluate your web site from a high-level marketing perspective.</p>
                <p class="p_text">All of our sample tests mimic search engine functionality. Check our site to see where your score falls in the overall Denver market.</p>


                </div> <!-- close mid_col_inner -->


            </div> <!-- close mid_col -->

            <div id="mid_center">

                <div id="top_cent">

                    <img src="images/revenue_subhead.png" />

                </div> <!-- close top_cent -->

                <div id="mid_cent">

                    <p class="mid_col_text">Enter the code (no punctuation or spaces) from our communication with you to see your score.</p>


                </div> <!-- close mid_cent -->

                <div id="bot_cent">

                    <div id="bot_left">

                        <form method="POST" action="<?php $_SERVER['PHP_SELF'] ?> " />

                        <label id="label2">Enter code: </label>
                        <input type="text" name="code" id="code" />


                        <input type="submit" name="submit" id="code_submit" />
                        </form>

                    </div> <!-- close bot_left -->

                    <div id="bot_right">

                        <?php 

                            if (($_POST['submit']) and (empty($_POST['code']))) {
                                echo "<br/><br/>";
                                print "<p class=\"spl_p\"> Please select choice!</p>";
                            }

                            if (!empty($_POST['code']))  {
                                $response = $_POST['code'];
                                echo $response;

                                $test_name = $response . ".txt";

                            $test_name = "../id_advisors/$test_name";
                            if (!file_exists($test_name)) {
                                echo "Please re-enter code!";
                                exit();
                            }
                            }
                            if (!empty($_POST['code'])) {
                            echo $test_name;
                            // read in the details of the file for each firm

                            $pointer = fopen("../id_advisors/$test_name", "r");
                            $data_line = fgets($pointer, 1096);
                            fclose($pointer);

                            $file_array = explode("\t", $data_line);

                            foreach ($file_array as $item) {

                            $item = $file_array;


                            $firm_name = $file_array[0];
                            $mkt_id = $file_array[1];
                            $site_id = $file_array[2];
                            $score = $file_array[3];
                            $pages = $file_array[4];
                            $traffic_rank = $file_array[5];
                            $in_links = $file_array[6];
                            $start_date = $file_array[7];

                            }
                            }
                            ?>

                            <table id="form_2" cellpadding="-3">

                            <tr><td width="100">Firm name: </td><td><input type="text" name="f_name" id="f-name" value="<?php echo $firm_name; ?>" /></td></tr>
                            <tr><td width="100">Market ID: </td><td><input type="text" name="mkt" id="mkt" value="<?php echo $mkt_id; ?>" /></td></tr>
                            <tr><td width="100">URL : </td><td><input type="text" name="url" id="url" value="<?php echo $site_id; ?>" /></td></tr>
                            <tr><td width="100">Score: </td><td><input type="text" name="score" id="score" value="<?php echo $score; ?>" /></td></tr>
                            <tr><td width="100">Index pages: </td><td><input type="text" name="pages" id="pages" value="<?php echo $pages; ?>" /></td></tr>
                            <tr><td width="100">Traffic: </td><td><input type="text" name="traff" id="traff" value="<?php echo $traffic_rank; ?>" /></td></tr>
                            <tr><td width="100">Inbound links: </td><td><input type="text" name="i_links" id="i_links" value="<?php echo $in_links; ?>" /></td></tr>
                            <tr><td width="100">Test date: </td><td><input type="text" name="t_date" id="t_date" value="<?php echo $start_date; ?>" /></td></tr>

                            </table>

                    </div> <!-- close bot_right -->

                </div> <!-- close bot_cent -->

            </div> <!-- close mid_left -->

            <div id="mid_right">


            </div> <!-- close mid_left -->

        </div> <!-- close mid_cont -->

        <div id="footer">



        </div> <!-- footer -->
        <div id="sub_foot">

            <p>Copyright 2012  |  Lighthouse Pacific Group, LLC  -  All Rights Reserved</p>

        </div> <!-- close sub_foot -->

    </div> <!-- close wrapper -->

</body>
</html>
  • 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-28T02:52:13+00:00Added an answer on May 28, 2026 at 2:52 am

    You’re closing your FORM element on the same line you create it:

     <form method="POST" action="<?php $_SERVER['PHP_SELF'] ?> " />
    

    change that to this:

    <form method="POST" action="<?php $_SERVER['PHP_SELF'] ?> ">
    

    I’m not sure that will fix your redirect problem specifically, but I know it will cause some problems with your form submission if you don’t fix that.

    EDIT

    OK I overlooked the problem the first time, here’s the fix, change the same line of code listed above, but include echo…

    <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    

    or to simplify:

    <form method="POST" action="<?=$_SERVER['PHP_SELF']?>">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Tried posting this before but it did not go through (i think) so if
I asked this question before but with less information than I have now. What
Probably this question was already asked before, but my google-fu and SO-Search did not
I have tried this question on the site of Titanium and several tweets to
Note: This question has broadened in scope from previous revisions. I have tried to
I tried following the answer to this question , but could not get xsd.exe
I guess this is kind of an odd question but I have tried setting
Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything,
Frstly my apologies if this is a duplicate question. I have tried to find
Well, I tried to ask this question as a comment on this question, but

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.