stevengreen22 Posted December 7, 2011 Share Posted December 7, 2011 Hi guys, I'm hoping someone may be able to help and that the lack of PHP in the topic wont be a deterrant. I've a task that involves creating a website that imitates an online shop. Theres a database involved with relevant info for obtaining the details. So far, I've got the site up and running using both html pages and servlets. I can run queries to the db using the servlet and postgres and can also display the info on another screen. What I'd like to do is firstly find out the correct method for inserting the information gathered such as card details etc into the db and also how I can use this to reflect stock levels? I'm thinking that as soon as something is bought I must have to 'delete' that item from the stock while inserting the item and card details etc into 2 new tables (payments and cust info) Could anyone help please? Also...I'm searching for a way to validate the information given. I'd like to restrict the text field for contact numbers to nothing but numbers. And also for the card lenght, must be 16 digits etc. For card length I cna see the logic fairly clearly in that : if (cardLength > 16){print error etc}else{return} (I think this is structured incorrectly but I hope the logic is partially right. Many thanks for your time and help! Quote Link to comment https://forums.phpfreaks.com/topic/252658-help-with-both-inserting-tables-and-using-a-servet-to-run-the-queries/ 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.