SuperWebman Posted July 18, 2011 Share Posted July 18, 2011 Hey guys and gals. I just got this thrown on my like 5 mins ago and i'm not sure how to start this. What I need to do is this: I have a coupon ad but I don't want people to be able to see or print it off unless they give me their information. How can I start this? Thanks, B Quote Link to comment https://forums.phpfreaks.com/topic/242274-coupon-ad/ Share on other sites More sharing options...
AyKay47 Posted July 18, 2011 Share Posted July 18, 2011 Do you have any code at all for this? You will most likely start this off but creating an HTML form for the users to fill out the necessary information that you require. Then you will want to use PHP to validate the user information, make sure that all of the necessary information is filled out, and if you so desire, store the information in a database for later use. I am not sure of your programming skills, thus I am not sure how you know about how to tackle what I have just stated, if you need further assistance, let us know. Quote Link to comment https://forums.phpfreaks.com/topic/242274-coupon-ad/#findComment-1244288 Share on other sites More sharing options...
Psycho Posted July 18, 2011 Share Posted July 18, 2011 1. Build a form for the users to enter their information 2. Create a script that processes the entered information and saves to a database. Also in that process store a unique code associated with the user. The provide a URL to the user (either on the web page when the form is submitted or via an email) with the unique code included as a parameter on the url, such as: www.yourdomain.getad.php&code=1234566789 3. Create the script to display the ad which pulls the unique code from the URL and verifies it against the database. This ensure only users who have provided their information can access the AD. However, there is nothing to stop users from sharing the link with others. You could "try" and restrict users by IP address if it doesn't match the one used when submitting the form, but that's not a good idea. Or you could include an expiration date for the code in the database. Depends on what your business requirements are. Quote Link to comment https://forums.phpfreaks.com/topic/242274-coupon-ad/#findComment-1244289 Share on other sites More sharing options...
SuperWebman Posted July 18, 2011 Author Share Posted July 18, 2011 thanks so much i'm in a rush on this so i appreciate the advice Quote Link to comment https://forums.phpfreaks.com/topic/242274-coupon-ad/#findComment-1244290 Share on other sites More sharing options...
SuperWebman Posted July 19, 2011 Author Share Posted July 19, 2011 Well this is kinda what I did. I just made a wordpress site and put a plugin that basically would take the information that is inputted into it and email it to sales then redirect to the coupon site. Only problem now is that they are wanting when the people are redirected for all their information to be there and two more labels. One is stock # and the other is authorized by. These will be filled in when they take to dealership by manager. Oh and they have to be able to print this off lol. Quote Link to comment https://forums.phpfreaks.com/topic/242274-coupon-ad/#findComment-1244671 Share on other sites More sharing options...
SuperWebman Posted July 19, 2011 Author Share Posted July 19, 2011 ok so this is working as far as the form submitting to sales, but how would i go by making it also send a coupon to a persons email after they submit it? Is this possible? I'm moving this to another area because I don't think this is the right place for it. Quote Link to comment https://forums.phpfreaks.com/topic/242274-coupon-ad/#findComment-1244776 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.