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:
file.php:
Cannot redeclare saveorder() (previously declared in :10) on line 71Either use
include_onceorrequire_onceto 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_oncepart).