irrelevantjoker Posted October 3, 2006 Share Posted October 3, 2006 Hey all,i'm designing an order system through php, the orders get emailed to my account and then the customers are taken to the payment systemhowever, 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 foris 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?cheers, ;D - Joker Quote Link to comment Share on other sites More sharing options...
Hi I Am Timbo Posted October 3, 2006 Share Posted October 3, 2006 You could use a try and catch block, catching exceptions an handling them effectively if you have php5 available. Otherwise, doing 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. Quote Link to comment Share on other sites More sharing options...
irrelevantjoker Posted October 3, 2006 Author Share Posted October 3, 2006 aye i recommended database storage as a priority, but this project has gone over schedule (by about 4 months, they only hired me 3 weeks ago) so a basic email record system will be useddatabase will definately be made for stage 2 ;Dthanks for the help Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Share Posted October 3, 2006 it would take you 10 minutes to build a table within a databaseit'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 minutescreate 1 table called userinfo1 field called id - int(30) autoinc, primemail - varchar - 200that's itthen in the scripttake the email address and insert it into the table$insert = "INSERT INTO userinfo (email) VALUES ('$email');";mysql_query($insert);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. Quote Link to comment 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.