I am having an issue updating my database with php and mysql. I know how to do this with a regular straight forward page, but I have since redesigned my site to be more moduler.
The problem I am having is that my index.php calls other php files to make the users home page. Everything is passed through index.php. After the page that either adds or edits a database entry the page calls itself to save the data. When this happens it does update, or add the new info, but it won't call the conformation page. Or rather it does call it, but I get the error cannot fine main(). Since I do not have a main function I can only assume this is an internal error. I will list the code below.
Here are the errors:
Warning: main(index.php?body=conformation.php&page=Update Work Order): failed to open stream: No such file or directory in C:\Program Files\Apache Group\Apache2\htdocs\ethernet\editworkorder.php on line 14
Warning: main(): Failed opening 'index.php?body=conformation.php&page=Update Work Order' for inclusion (include_path='C:\Program Files\Apache Group\Apache2\htdocs') in C:\Program Files\Apache Group\Apache2\htdocs\ethernet\editworkorder.php on line 14
index.php
header and emnu
...
inculde($body.php);
..
side menu and footer
edit.php
if ($submit)
{
this is where i do the update which works ;
include("index.php?body=conformation.php&page=Update");
}else{
rest of code
for some reason when it gets to the conformation.php to include it causes an error. Before I modulated it everything worked, but now the I kinda include a file in a file it craps out. Any help would be appreciated.
Thanks,
Luckybob