I am getting this error for re-declaring saveorder() however, I don't think I am?!?
Cannot redeclare saveorder() (previously declared in :10) on line 71
8.function saveOrder()
9.{
10. include 'tables.php';
11. $orderId = 0;
12. $shippingCost = 5;
...
68. }
69. echo $orderId;
70. return $orderId;
71. }
You could be including the file that contains the function more than once:
include 'file.php';
include 'file2.php';
file.php:
include 'file2.php';
Cannot redeclare saveorder() (previously declared in :10) on line 71
Either use include_once
or require_once
to make sure it doesn't happen (this can cause problems if you try to include it twice in two separate locations (like first in a file, then later inside a function for some reason, the second one will not work if you include the _once
part).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With