SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: IE Tweak

  1. #1
    SitePoint Zealot bkflash's Avatar
    Join Date
    Apr 2006
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE Tweak

    im using php to design my webpage, and i have a problem after people submit the data i would like to have th page reload itself at the end of the script. im using the code now below

    Code:
    echo '<meta http-equiv="refresh" content="2;url=http://www.bigdogcompany.com/admincp/delete_homes.php">';
    problem is that when i use that in IE it just prints out the code <meta http..... i was going to use header but then it caused an error with my site saying i sent out the header information 2 times, is there a simple fix for this?

  2. #2
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use ob_start() at the very beginning of your code and then your header then ob_flush at the end.

  3. #3
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not have the page call itself? Something like this:

    atest3.php:
    PHP Code:
    <body>

    <?php

    if($_REQUEST
    {
        echo 
    "<div>data from the form is: $_REQUEST[theInput]</div>";
           
           
    //...or store the form data in a database
    }
    else
    {
        echo 
    "<div>first time loaded</div>";
            
           
    //...or do nothing
    }

    ?>

    <form name="f" method="post" action="atest3.php">

    <input type="text" name="theInput" />
    <input type="submit" value="Submit" />

    </form>


    </body>
    Last edited by 7stud; Jan 11, 2007 at 02:29.

  4. #4
    SitePoint Zealot bkflash's Avatar
    Join Date
    Apr 2006
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •