Jump to content

reload page is correct?


lioslios

Recommended Posts

hello guys, i have a question,

 

in some php files i have in the start

 

<? ob_start(); ?>

 

 

<?php

 

session_start();

 

........

.....

......

 

 

if(isset($_POST['sub_1']))

                                {

                            $_SESSION['address_tmp']=$_SESSION['address_tmp']." oK ";

                            header("location:some_other_page.php#jumpselection");

                                }

 

 

if(isset($_POST['sub_2']))

                                {

                            $_SESSION['address2_tmp']=$_SESSION['address2_tmp']." hello ";

                            header("location:thispage.php#jumpselection");

                                }

 

 

 

?>

 

<body>

<form method="post" action="">

<input type="Submit" name="sub_1" value="action1"style="height:3.9em; width:16.5em; font-size:95%;">

</form>

</body>

 

<body>

<form method="post" action="">

<input type="Submit" name="sub_2" value="action2"style="height:3.9em; width:16.5em; font-size:95%;">

</form>

</body>

 

<? ob_end_flush(); ?>

 

 

but every page have 10-15 buttons every button in the end reloads the same page with  header("location:thispage.php#jumpselection"); or cals another page with  header("location:some_other_page.php#jumpselection");

 

this works but i notise some lag on the bowser afrer while..

 

Link to comment
https://forums.phpfreaks.com/topic/254803-reload-page-is-correct/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.