reload page is correct?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lioslios
Forum Newbie
Posts: 2
Joined: Wed Jan 11, 2012 7:05 pm

reload page is correct?

Post by lioslios »

hello guys, im new in php and i have a problem, i have create a php site that works ok but in my android phone, after i use for some hour delays the browsers ( i have test lot of browsers)


Code: Select all

<? ob_start(); ?>


<?php

session_start();

........
.....
......
some code and conection to mysql 


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 like the above is the code, and 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..

the <? ob_end_flush(); ?> <? ob_start(); ?> is ok?? h have place this at the first and last line of the php file
Post Reply