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. Quote 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! Quote 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. Quote 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 Quote 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. Quote 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? Quote 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? Quote 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... Quote Link to comment https://forums.phpfreaks.com/topic/69493-create-invoice/#findComment-349207 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.