PDA

View Full Version : [Diffrent Topic yet i still need help!] Confused on this. (Stuck)



Foxcom
06-01-2013, 07:47 AM
Hey Guys,

I'll keep it short.
> Creating invoice part to one of my projects.
> Found a simple nice tut on a invoice system
> Want to integrate it into my system.

{Here Go's}

So i have a customer booking system created and ready to go, Now i want to integrate an invoice system to it. I'm confused at where i am on the following code.

The invoice system (tut) want's to create new customers every time although i want to link it with my current one's?
(If that makes any sense)

When you submit the invoice it run's this code:
INSERT into $database.Order_head values('', '$invoice_number', '$buyer', '$time_stamp', '$delivery_date', '$payment_method')

How could i change or modify that to insert it into my other db and tell it to select the user's id?

I want it to submit into my "customer db" but to the correct user i want it to?

I hope i haven't mixed my words - Sorry for any confusion i've been up since 3am trying to work this out.. :)

You can see the tut for the invoice system here: http://aarnet.dl.sourceforge.net/project/easyphpminvoice/EasyInvoice.zip

Thanks heaps again.
Chris.

Zak
06-01-2013, 11:53 AM
$sql="INSERT INTO $your_tbl_name(invoiceNum, buyer, time, date, payment)VALUES('$invoice_number', '$buyer', '$time_stamp', '$delivery_date', '$payment_method')";

$result=mysql_query($sql);

Make sure your field names in your db are correct. Sorry I don't know much PHP I'm more of an SQL man myself.

Foxcom
08-01-2013, 10:54 AM
Thank-You for your reply.
I have had this sorted out already.
Thanks (:

Want to hide these adverts? Register an account for free!