-3

Can you help me with this errors. I am actually trying to generate an invoice. However, my generated invoice having some problems as you can see as the image below.

The errors in my invoice

Here is the image of my coding.

Error in line 38

devpro
  • 16,184
  • 3
  • 27
  • 38

2 Answers2

0
$oid = ( isset($_GET['oid']) ) ? $_GET['oid'] : null;

Also I believe line 38 should come before line 37. bindParam calls a variable defined after it.

fie
  • 407
  • 3
  • 10
0

You use variable $oid which it's data is $_GET['oid'], in your query before you actually declare/store data to it.

Move line 38 -> $oid = $_GET['oid']; after opening try/catch, that means to line 29, before stating the query. You should implement @fie answer too, to be sure that $oid is not null and that data actually exists.

Also something is wrong with line 73 but we can't see it.

devpro
  • 16,184
  • 3
  • 27
  • 38
Antonios Tsimourtos
  • 1,676
  • 1
  • 14
  • 37