Hi everyone, im trying to put in a 16 digit credit card with space or "-" after each 4 digits. the code works fine if I put in a correct 16 digit code... but if I put in the wrong code it asks me once again to enter the details and I put in the correct details it will keep asking me re enter the detail. now if I put in a bad code it will ask me once to re enter but if I put in the right code it will pop up 4 times saying to enter details???? any ideas.
You need to implement a way to change the value of valid to true once it has been set to false. Your code in the do while loop only sets value to false, so if you entered it right the second time there is no way for valid to become true. Initialize your bool variable at the beginning of your loop instead of outside of it.
Thanks very much to both of ye have been at it all day :) but great satisfaction out of getting it done now :). Here are the changes and works a treat. Thanks again
thanks giblet I was maybe abit hasty in thinking it was done last week as it was not working correctly so I have just used what you said and have done a few tests and it seems to be working right this time thanks for the help