Jump to content

Recommended Posts

Now, the topic title may sound a lot more different to the problem. Now I'm building a dynamic website and I'm doing it with php using "$GET_". That's all fine but so then I can change the page title to the dynamic page they are on and other values that are submitted before the main dynamic code comes in, I need to use ob_start() and ob_end() as seen:

 

ob_start();
$p = $_GET['p'];
if(!empty($_GET['p'])){
$pages_dir = 'pages';
$pages = scandir($pages_dir, 0);
unset($pages[0], $pages[1]);
if(in_array($p.'.php', $pages)){
include $pages_dir.'/'.$p.'.php';
}
}else{
$title = "News";
}
ob_end_clean();

 

Now, this is also done further down the page (a bit more advance) in the area which the content will be put. The idea is to get some values off of the page. But if I should go to a submission page I get the issue of the form submitting, is there a option in php that during the ob_start that all forms and mysql_querys and so on are banned from processing with out having to go through every page?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/271363-form-submitting-twice/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.