I think I can figure out the code for this but I am having a very hard time getting past the first step. Any suggestions are greatly appreciated.
What I need to do is take a 9 digit account number (for an electrical bill) and 1) determine if it is a valid account using the check digit, and 2) determine the type of account it is (ie if the 2nd digit is a 4, its a residential account).
Suppose the account is 123456789 and I need to add the 3rd, 5th, 7th, and 9th digits, how to do I extact the digits so they can be worked with? All I can think of is to do something like this:
cout << "enter the third digit of your account"
cin >> digit3 >> endl;
cout << "enter the fifth digit..."
cin >> digit5 >> endl;
and so on...
total = digit3 + digit5 + digit7 + digit 9
Its obviously not practical to have the user enter their account number one digit per line as I am doing But how else do it make the account number into something I can manipulate?
I am a beginner. And not a very smart one, obviously :(
Undefined offset when using a flat file with pipe symbols
Hi, I've got a flat file/text file which I'm currently using as a member database for my site (not advisable I know.. but still learning here).In a section of code I need to separate the fields to
php wont update my db
hello,sorry for posting in mysql forum but i dont know where exactly is the problem but here is the linkhttp://www.phpfreaks.com/forums/index.php/topic,272737.0.htm
Extra fields in main body and php required.
I'm new to PHP so please be gentle. I have a little php script below that works well. The "$msgVar" goes into the body message of the email. How can I effect additional fields that can be
SAP Treasury - Commodities
We are running SAP ECC 6.0 with Treasury Activated.
How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.However the problem is everytime I get a visitor to the webpage it calls the API which means lots of wasteful
Variable passed to each() is not an array or object
Hi,This is a email a friend type of form, and it isn't working anymore.<? function validate_email($email, $location) { $valid_address = true; $mail_pat = '^(.+)@(.+)$'; $valid_chars =
Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and timestamp is specified 10-11 am
Web Host List
Here is a list of web hosts that offer PHP and MySQL. It is no where near a full list, but it is most popular. I'm locking this so you can't reply. I am pulling this list from the most popular google
Select Lists into MYSQL
Hello All, I am new to PHP @ 1 week. So borrowing code anywhere I can. I am making progress, but hit a snag. I have 2 list boxes, that I use to move items left to right. When I click submit I want
Add trigger to UpdatePanel programmatically
Hi,I'm working on a website which uses AJAX and Masterpages. What I have is an AJAX UpdatePanel which contains the ContentPlaceHolder on the MasterPage.However, on one page I have a FileUpload