Help with php coding on website

Hello, first off, I would like to thank you for reading my post.

I am currently working on a website and any help given would be greatly appreciated. I would like to create an automated coupon on que when when someone registers with our website. Essentially, when someone registers with out website I would like for the user to automatically receive a coupon for an x amount of % off. The coupon name will be the email that they register with. I have figured out how to send the email that says "thank you, your coupon code is user’s email.’. The part I am having trouble with is automatically storing the coupon code into our database on the website. We have a coupon_add page that has the standard:
-Promotion Name
-Promotion Code
-Promotion type-(Discount %, Discount amount, Price off)
-Apply to coupon-(Category, Bundle, Product)
-Category-(lists all the categories on the website)
-Effective starting Date
-Effective end date

How do I bring a pointer and store the email address from the sign up into and automatically add a coupon? I am a noob to the fullest extent and am willing to work hard on the problem however I don’t even know where to begin. Thank you.

when the email is sent to your customer you may want to put this after the coupon code has been generated that way you can generate the coupon code and make sure everything runs smoothly before emailing your customer. so in effect in my opinion use a function. and use a mysql code to add the now date (for instance NOW() will add the date) and then when the user comes to enter the code maybe you have a seperate code that checks the age of the coupon? the name, code, type and category really depend on how you are going to get this data? also can i note if in your category it is going to list all catagories then is this necessary? if you want any help email me. I’ll be glad to try and assist you

I have sent an email to you, if you could respond that would be great. Thank you for your time!

Sponsor our Newsletter | Privacy Policy | Terms of Service