squishypentagon Posted February 17, 2011 Share Posted February 17, 2011 I have a pretty complicated script i'm trying to work on but i'm not having much luck. Basically what needs to happen is i need part of my script to check a database and count 2 different sets of data for the current date, then if both conditions are true then submit the users name, current date, and a time id to the database it checks, and then submit the form data to a text file. i'll try and map it out. check database for how many times the username appears for current date if it is less than 3 move to next validation if it is false, give error message check database for how many times the time id appears for current date if it is less than 30 move to next section if it is false, give error message send username, timestamp (of clients computer), and time id to the 'totals' database and send form data to text file. So.... thats it in a nutshell. I'm going to have to go into my 'cart' page and edit in a row to have the order#, username, timestamp, and time id before the rest of the order details Quote Link to comment https://forums.phpfreaks.com/topic/227984-form-validation/ Share on other sites More sharing options...
cgsmith105 Posted February 17, 2011 Share Posted February 17, 2011 That's nice that you have a complicated script ! Shouldn't be. Are you looking for someone here to write it for you? Quote Link to comment https://forums.phpfreaks.com/topic/227984-form-validation/#findComment-1175598 Share on other sites More sharing options...
squishypentagon Posted February 17, 2011 Author Share Posted February 17, 2011 I really need some guidance. I don't necessarily need to have someone do it, but stepping me through it would be ok. I just havent done much with php if statements so yeah. Quote Link to comment https://forums.phpfreaks.com/topic/227984-form-validation/#findComment-1175601 Share on other sites More sharing options...
squishypentagon Posted February 17, 2011 Author Share Posted February 17, 2011 Does no one want to help? Quote Link to comment https://forums.phpfreaks.com/topic/227984-form-validation/#findComment-1175613 Share on other sites More sharing options...
TheUkSniper Posted February 17, 2011 Share Posted February 17, 2011 Have a look at: http://www.w3schools.com/php/php_if_else.asp Quote Link to comment https://forums.phpfreaks.com/topic/227984-form-validation/#findComment-1175627 Share on other sites More sharing options...
KevinM1 Posted February 17, 2011 Share Posted February 17, 2011 Don't send him to w3schools. See the following for why: http://w3fools.com/ When in doubt, go straight to the source. The PHP manual: http://www.php.net/manual/en/langref.php Quote Link to comment https://forums.phpfreaks.com/topic/227984-form-validation/#findComment-1175631 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.