pokazują mi się takie błędy:
Notice: Undefined variable: custid in C:\wamp\www\sklep_internetowy\checkout3.php on line 72
Notice: Undefined variable: customers_custnum in C:\wamp\www\sklep_internetowy\checkout3.php on line 91
fragment kodu:
Kod
47 if ($rows < 1) {
48 // przypisz nowy numer klienta
49 $query2 = "INSERT INTO customers (
50 customers_firstname, customers_lastname, customers_add1,
51 customers_add2, customers_city, customers_state,
52 customers_zip, customers_phone, customers_fax,
53 customers_email)
54 VALUES (
55 '$firstname',
56 '$lastname',
57 '$add1',
58 '$add2',
59 '$city',
60 '$state',
61 '$zip',
62 '$phone',
63 '$fax',
64 '$email')";
65 $insert = mysql_query($query2)
66 or (mysql_error());
67 $custid = mysql_insert_id();
68 }
69
70 // Jeśli istnieje custid, przypiszmy go do custnum.
71 // W przeciwnym przypadku pozostawny istniejącą wartość custnum.
72 if ($custid) {
73 $customers_custnum = $custid;
74 }
48 // przypisz nowy numer klienta
49 $query2 = "INSERT INTO customers (
50 customers_firstname, customers_lastname, customers_add1,
51 customers_add2, customers_city, customers_state,
52 customers_zip, customers_phone, customers_fax,
53 customers_email)
54 VALUES (
55 '$firstname',
56 '$lastname',
57 '$add1',
58 '$add2',
59 '$city',
60 '$state',
61 '$zip',
62 '$phone',
63 '$fax',
64 '$email')";
65 $insert = mysql_query($query2)
66 or (mysql_error());
67 $custid = mysql_insert_id();
68 }
69
70 // Jeśli istnieje custid, przypiszmy go do custnum.
71 // W przeciwnym przypadku pozostawny istniejącą wartość custnum.
72 if ($custid) {
73 $customers_custnum = $custid;
74 }
do zmiennej custid jest przypisywana wartość z kolumny autoincrement (customers_custnum)
proszę o pomoc w odnalezieniu błędu