I'm looking for a small program or script (PHP) that will generate random alphanumeric coupon codes for our ecommerce site. Can anyone point me in the right direction?
8:22 pm on Aug 1, 2007 (gmt 0)
Did you check the contributions on osCommerce?
8:39 pm on Aug 1, 2007 (gmt 0)
Hi Corey. We already have our own site/system where we can create discount coupons, but we have to come up with our own code ID's. I'm looking for a small program or script that will simply generate random (alphanumeric) ID's for our coupons. Kind of like those Lottery number generators...
8:46 pm on Aug 1, 2007 (gmt 0)
Is this for people to use the coupon or for your records? You code generate a session ID for each coupon. I don't know the code for PHP, but in ASP it's
<% Response.Write(Session.SessionID) %>
9:06 pm on Aug 1, 2007 (gmt 0)
As it is now, I create the coupon in our system to give out (or advertise) to our customers. The coupon ID is the "code" that the customer will enter to receive their discount. And, right now, I have to manually come up with the code ID every time I create a coupon. For example, "ABC123" is the ID for a coupon offering 10% off.
Sure...it's not a big deal to make these up myself. I was just curious if there was something out there to create an ID randomly.
9:24 pm on Aug 1, 2007 (gmt 0)
Just do a quick search for a password generator script, or alpha numeric generator script.
You should get tons of results.
9:37 pm on Aug 1, 2007 (gmt 0)
Thanks, Gibble! You're right, there's quite a few. I should have been thinking "password" and not "coupon".