I've got a website where I want to offer the user to generate raffle tickets with their business name on them. I need a form, with a single field for business name. The tickets would look like..... Business Name Name:____________ Address:_____________ Phone:______________ I would like the user to be able to key in the business name, click 'Create Tickets', and have their printer box pop up asking how many copies (the usual printer box), etc. If the user selects 'one' page to be printed, then about 10 tickets would print out on one sheet of paper. They would then just cut them out and use 'em. I already have the webpage (and site for that matter) created. Just need the code that will go under my <body> tag. Payment - Lets face it, I'm broke. The only thing I got that I can offer is a link from my blog in my sig, and/or a post with your links in it from said blog. (i'm pretty lenient on what I link to, but I won't link to porn) If I could offer more, I would. Thanks for any help, and of course there is some green in it for anyone that participates.
Just a thought here, and I really don't have any idea how doable this is.... But what if I had some sort of external file, like an excel spreadsheet, text document, whatever.... and the code simply replaced the line of text with whatever the user put in the field, and then spat it out to the printer? Uhg... I wish I knew more about programming. *Edit* I guess I should mention that it would be nice (but not required I guess), if I would be able to receive an e'mail any time someone uses the ticket generator. Just for tracking purposes of course. I suppose G analytics would be good enough tho. Just a thought.
I know..... any programmer willing to do this absolutely deserves money for it. When I say I'm broke, I really mean it..... The wife deposited $450 in our checking account the other day, and our new balance was -$200. How sad is that? Yes, it's a sob story, but it's all I got.
I don't think selecting the number of copies in the printer box itself will work. Rather, you will need to generate each ticket within the webpage and have the user print 1 copy. If you know HTML this should get you going, just save as a PHP document. <?php echo $business; ?> makes the business name appear. <?php if(!isset($_POST['submit'])){ ////////// THIS IS YOUR FORM ?> <form action="#" method="POST" name="tickets"> Business Name: <input type="text" name="name"><br> Number of Tickets: <input type="text" name="num"><br> <input type="submit" name="submit" value="Generate"> </form> <?php ////// Your form ended } else { $business = $_POST['name']; for($i=0;$i<$_POST['num'];$i++){ // this is the HTML for each ticket ?> <div> <b><?PHP echo $business; ?></b><br><br> Name:_______________<br> Phone:_______________<br> Address:_______________ </div><br> <?php //This ends the ticket HTML } } ?> PHP: Hope this helps. e39m5
So, I just copy that whole box of code, into my existing page? I'll give it a shot.... Also, just in case I didn't make myself clear, I don't want the user to key in their business name AND number of pages to print. Just key in the business name, and hit the print button. Then the website would somehow cue the users local printer for a print job. Just like when you tell anything to print on your computer, a box would pop up asking you how many copies to print, do you want it landscape, set the printer properties for quality, etc. Know what I mean?
I think if you have a block of text on a webpage and tell it to print multiple copies it would print one tick per page. e39m5
K.... So I gave it a shot. I copied and pasted the code. Looks like the business name box comes up, the number of copies box comes up, the 'generate button' is there, and down below there is the ticket information. However, keying in the data and hitting the button doesn't quite do anything. Second of all, my gut tells me that if the only way to make this work is to have the user print the html page, then the user will need to be redirected to another page, other wise they'd be printing out my header logo, nav menu, and anything else thats there. Thoughts?
Oh... yeah, that wouldn't be too good in this situation, as the user will most definitly want maybe 200 tickets at a time. (at least 8-10 tickets per page). If we do one ticket per page, they'd be wasting a lot of paper. hahahah