AdriaanNL

AdriaanNL does not currently provide support for this item.

Popular questions for this item

How can i save the InvoiceForm data to my database?

If you would like to save the data to your database you could do it with the code below, make sure you edit/delete the fields you don’t need, this is for example purpose only to get you started.

Save invoice to database
        if(mysqli_query($db, "INSERT INTO invoiceform_invoices (
        userID,
        invoiceNr,
        invoiceDate,
        invoiceSubtotal,
        invoiceTax,
        invoiceTotal,
        invoiceTotalPaid,
        invoiceTotalDue,
        invoiceClientID,
        invoiceClientName,
        invoiceLogo,
        invoiceNote,
        invoiceTaxRate,
        invoiceClientAddress,
        invoiceAddress
        ) VALUES (
        '".mysqli_real_escape_string($db, $_SESSION['login_userId'])."',
        '".mysqli_real_escape_string($db, $invoice_nr)."',
        '".mysqli_real_escape_string($db, date("Y-m-d", strtotime($date)))."',
        '".mysqli_real_escape_string($db, $invoice_subtotal)."',
        '".mysqli_real_escape_String($db, $invoice_total_tax)."',
        '".mysqli_real_escape_string($db, $invoice_subtotal + $invoice_total_tax)."',
        '".mysqli_real_escape_string($db, $invoice_total_paid)."',
        '".mysqli_real_escape_string($db, $invoice_total_due)."',
        '".mysqli_real_escape_string($db, $clientID)."',
        '".mysqli_real_escape_string($db, $clientName)."',
        '".mysqli_real_escape_string($db, $logo_src)."',
        '".mysqli_real_escape_string($db, $notes)."',
        '".mysqli_real_escape_String($db, $invoice_taxrate)."',
        '".mysqli_real_escape_string($db, $address_to)."',
        '".mysqli_real_escape_string($db, $address_from)."'
        )")) {

            header("location: invoices.php?action=saved");
        }

        $invoiceID = mysqli_insert_id($db);

        Save each invoice line of items 
        if (!empty($item_name)) {
        foreach($item_name as $a => $b) {

            mysqli_query($db, "INSERT INTO invoiceform_invoices_items (
            invoiceID,
            itemName,
            itemDescription,
            itemPrice,
            itemQty,
            itemPriceTotal
            ) VALUES (
            '".$invoiceID."',
            '".mysqli_real_escape_string($db, $item_name[$a])."',
            '".mysqli_real_escape_string($db, $item_desc[$a])."',
            '".mysqli_real_escape_string($db, $item_price[$a])."',
            '".mysqli_real_escape_string($db, $item_qty[$a])."',
            '".mysqli_real_escape_string($db, $item_qty[$a] * $item_price[$a])."'
            )") or die(mysqli_error());

        }
        }
by
by
by
by
by
by