Emailing through PHP question
Posted 03 October 2006 - 06:00 AM
i'm designing an order system through php, the orders get emailed to my account and then the customers are taken to the payment system
however, if there is an error and the email doesn't get sent and the customer pays for it, i'll have no idea what they paid for
is there some form of code to make sure the email was sent successfully before continuing? and if the email fails, redirect the customer to another page?
Posted 03 October 2006 - 07:05 AM
mail() OR die()
would work too, but that would just notify the user that the mail wasn't sent.
The normal way of handling this is to store the information in a database so even if the mail is not sent, it still exists in the database. I'm not sure if this is feasible or not, but could be a good option.
Posted 03 October 2006 - 10:08 PM
database will definately be made for stage 2
thanks for the help
Posted 03 October 2006 - 10:26 PM
it'll take you 5 minutes to program something to database, some form of identification for the orders, even if you just database there email address, and some other stuff. What would take taht long. 10-20 minutes of extra work.THen you atleast have a list of emails of buyers, and you can match that against your emails to make sure your getting them all. It would only take you 5 minutes
create 1 table called userinfo
1 field called
id - int(30) autoinc, prim
email - varchar - 200
then in the script
take the email address and insert it into the table
$insert = "INSERT INTO userinfo (email) VALUES ('$email');";
that's it in it's basic form you can build onto it from there, you can triplet he functionality in less that 30 minutes, that took 2 seconds.
Business Website: http://www.infotechnologist.biz
Personal Website: http://www.joyelpuryear.com
Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users