Jump to content

Form Submitting Twice!


CatcherOfSouls

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

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.