PHP - Need to redirect to top of page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpchild
    New Member
    • Jan 2013
    • 2

    #1

    PHP - Need to redirect to top of page

    Code:
    <?php
    $a;
    if($a)
    {
    echo "want to use header to redirect";
    }
    ?>
    <html>
    		<form action="aa.php" method="post">
    		
    		<input type="submit" value="submit">
    		</form>
    </html>
    
    <?php
    if(isset($_POST['submit']) && $_POST['submit'])
    		{
    				echo "okkk";
    				$a=true;
    		}
    		
    ?>
    I now am missing something silly here.. but can't figure
    out.... would be grateful if someone helps me here..thanks in advances...
    Last edited by phpchild; Jan 14 '13, 07:46 AM. Reason: Want to more clear...
Working...