forumnz Posted September 15, 2007 Share Posted September 15, 2007 Hey, Well I have a script that creates an invoice for a client. I choose from a dropdown box and it sends the client id to the next page to execute. I want to be able to make multiple ones at the same time (same cost etc) but can't figure it out. Here is a snippet that will help: <OPTION value=\"add_invoice.php?cid=$cid\">$cid | $name</OPTION> I thought just adding &cid=# multiple times with different numbers would work but it doesn't. PLease help, Sam. Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/ Share on other sites More sharing options...
rarebit Posted September 15, 2007 Share Posted September 15, 2007 The names would need to be different! Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/#findComment-349183 Share on other sites More sharing options...
forumnz Posted September 15, 2007 Author Share Posted September 15, 2007 Each client has a number (e.g. 5, 6, 7 etc) so what can I do? Sam. Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/#findComment-349185 Share on other sites More sharing options...
rarebit Posted September 15, 2007 Share Posted September 15, 2007 Use the 'multiple' option from select: http://www.w3schools.com/tags/tag_select.asp Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/#findComment-349187 Share on other sites More sharing options...
forumnz Posted September 15, 2007 Author Share Posted September 15, 2007 I know how to do that, I need to know what the code should be in the url of the next page So far its like /invoice/add_invoice.php?cid=8 and that will create invoice for client 8. How can I make it create invoice for clients 8,9,10 etc? Thanks, Sam. Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/#findComment-349193 Share on other sites More sharing options...
rarebit Posted September 15, 2007 Share Posted September 15, 2007 Isn't the url put in the form statement, and you get the elements info independently? Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/#findComment-349198 Share on other sites More sharing options...
forumnz Posted September 15, 2007 Author Share Posted September 15, 2007 Huh? It takes me to another page where i edit the invoice and click submit. On submit it creates the invoice, but only one. What can I do? Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/#findComment-349205 Share on other sites More sharing options...
rarebit Posted September 15, 2007 Share Posted September 15, 2007 Yes, use a multiple select box within a form, then you submit. When next page, read all the select objects, make an invoice for each... display all on page! You've attached the link to an individual item within the list... Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/#findComment-349207 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.