how to refresh page before Pop Up

Discussion in 'PHP' started by greatthings, Nov 24, 2011.

  1. #1
    a pop-up window button:

    Is there a Way to Refresh php page by clicking a Button, it should refresh before the POP-UP Window appears??
     
    Solved! View solution.
    greatthings, Nov 24, 2011 IP
  2. #2
    Assuming your page is called 'mypage.php'.

    You'd have a form for the button like this:

    <form action="mypage.php" method="POST">
    <input name="myButton" value="click me to refresh" type="submit"/>
    </form>
    HTML:
    Then at the top of 'mypage.php' look for the myButton param:

    if(isset($_POST['myButton']))
    {
    // show popup code here
    }
    PHP:
     
    mfscripts, Nov 24, 2011 IP