Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by phppup

  1. I am creating a database with the personal information of customers at a small business. Many of the customers are local residents, while some are business owners. For those customers with businesses, the company name and a corporate designation is desired. For purposes of database normalization, is it really necessary to create a separate table for these two pieces of information. What is the real downside of having two more rows in a single table? Helpful information appreciated.
  2. I'm starting of with a simple form to gather information and then store it in a database. While researching methods and techniques I discovered this: $firstname = mysql_real_escape_string($_POST['firstname']); $lastname = mysql_real_escape_string($_POST['lastname']); $email = mysql_real_escape_string($_POST['email']); Is it necessary to run mysql_real_escape_string for every item? Is there a more effective/efficient manner to handle this? Is there a better approach from a security standpoint? Please educate me.
  3. Thanks a ton. I have already begun doing some homework regarding AJAX and quickly learned that it sometimes (as I'm my case, naturally.. LOL) fails when used from smartphones. I will test your script and the others I've uncovered in tutorials tomorrow.
  4. So AJAX just makes the effort more dynamic? What an I searching for to learn and find what I need?
  5. Now we're making progress. Brand's suggestion is what I had in mind. I've never used AJAX and don't know if it might be a good exercise or an unnecessary complications. Opinions?? Again, I haven't written code for this yet, but suspect my biggest dilemma will not be searching for ask the Bob Smiths, but then shifting that data to assist in a form whereby the employee can select the radio button to submit new data to the account of the correct Bob Smith (verified by his address and/or telle number). This is where I was looking for some template that I could use for guidance.
  6. Does anyone start at the top? All of this was covered in my initial post. If you step away from the ridicule and READ the actual information you may discover that this is not as monumental as previous posters have concocted. @feasability: the owner wants it. This, it is feasible since all employees know how to speak. @new employees: they will be trained like monkeys to smile, say hello, and ask for the customers name. No additional ID required. Radical, isn't it?!?? So, back to the ISSUE created a week ago. The details are simple and outlined and clarified in my first and second posting. Thank you.
  7. This is for a small town business with a local customer base. The idea of a bar code system is good but cost prohibitive. However, the expense of a laptop and a few clicks by the friendly retailer that already knows everybody's name could help develop a better marketing plan. Setting up the database should be the most expensive piece. And I am doing this for free.
  8. Thanks Zane. But no, I am not trying to track website analytics, although I may take a look at this link for future reference. At this point I am trying to track physical visits to a physical store with actual communication between a live employee (at a cash register) and a local customer base. I just want to help this mom-and-pop shop have tangible data to determine who their best customers are, and possibly build up the weaker patrons.
  9. If you READ the first line of my first entry I said "I am in the beginning stages of (trying to develop) a customer tracking database and would appreciate guidance and direction." What occurred in my thought process was the realization that THIS particular step will give me a problem. I do not expect or want anyone to do the work for me. What I asked for was to be pointed in the right direction BEFORE wasting time wandering through the forest. If there is a recommended methodology or a best practice, it would probably take less time to explain it or offer the few lines of code as a template versus the keystrokes to dance around without lending assistance.
  10. I spent 3 days explaining a post that I thought was fairly clear and said: Please provide any coding help or direction that would help me with a dialogue box asking "Do you mean Bob Smith with this address/phone number?" Or perhaps list all the Bob Smiths from Anytown so that the correct one could be selected and the information could be attached to the corresponding customer's account. And you expect me to be able to develop it now because..... ? Maybe we should see if anyone else has some input.
  11. Yes, step three is where i am unsure, as the new form needs to be created from output but used for input. And the radio button needs to be properly associated. Can you give me an example of what the code should look like, so that I have a starting point?
  12. Agreed and understood. Now I need to bring up a dialog box (or some other recommended tool) that will allow the employee to select (via radio button, checkbox, or suggested method) the Bob or Kathy that has the address and/or phone number that corresponds with the information provided by the customer so that the correct record is updated. This is the step that has me unsure.
  13. Perhaps I should rephrase. Yes, I understand and agree with your point about 'unique identifiers' from within the database. But the retail store does not want to explain to Bob Smith #1 that he has customer number 104 while Bob Smith #2 has customer number 644. (This may be true inside the database, but the business wants to maintain a more 'personal' interaction.) What I am interested in developing is as follows (unless there are better ideas): Employee sells an item to Kathy Dougle. Since she is the ONLY customer name Kathy Dougle the employee is prompted to input the sale amount. The database now has recorded that Kathy spend $$$ on this date during this one visit. When Bob Smith makes a purchase and the employee does a search for Bob Smith, a prompt or dialogue box indicates "There are several customers with this name. Which Bob Smith do you want?" Bob Smith at 12 Main Street with tele. number 123-4567 or Bob Smith at 9 Lake Drive with tele number 456-7890 or Bob Smith at 44 Turnip Drive with tele number 878-0000. In this manner, the employee can ask the customer for additional identifying information and select the appropriate record and proceed to update it. I hope this clarifies my intent, and appreciate the help.
  14. I am in the beginning statges of (trying to develop) a customer tracking database and would appreciate guidance and direction. I want to be able to gather data on people that visit a specific retail business. This is something that I think I can establish initially. But I want to be able to cumulatively record additional visits and count them. More importantly, is that the business does not want to burden customers with a 'unique identifier.' So on a third visit, I want to be able to input the persons name and add to the cumulative visit count (and maybe tally the sale amount). However, by the third visit, there may be more than one Bob Smith from Anytown. Please provide any coding help or direction that would help me with a dialogue box asking "Do you mean Bob Smith with this address/phone number? Or peerhaps list all the Bob Smiths from Anytown so that the correct one could be selected and the information could be attached to the corresponding customer's account.
  15. Trying to get my head wrapped around the new MySQLi (versus PDO which looks a bit more intimidating for a newbie.. or am I wrong??) and have found that W3schools.com has samples of both procedural and object-oriented code. They seem very similar, but there are differences. Is one more prefered to the other? Is the code interchangeable within a script? Is the code interchangeable at all? Pros/Cons and necessities, requirements, expectations would be helpful. Thanks.
  16. Is there a recommended location that lists the old quieries and there corresponding replacements?
  17. Thanks. So I guess I certainly AM in that deep. Is the switch going to be painful? I'm sure there will be more questions as I progress. Thanks for the help.
  18. I don't know if I have gotten so deep as to be "creating SQL strings using PHP interpolation" but I guess I'll have to investigate. Meanwhile, will "old" PHP code utilizing a MySQL database still function, or are there modifications required.
  19. I've been away from PHP and MySQL for a while and have stumbled across MySQLi Is SQLi an improved version? Do I have to use it? Do I want to use it? Pros and cons????
  20. I have been out of the loop for a few years and I am creating a database for a business. It will hold customer personal info (name, address etc) as well as a sales history. I am looking for some initial guidance, best practices, and tutorials to avoid major pitfalls and silly mistakes. Thanks.
  21. I have some PHP code from version 5 that I haven't used in a while. Does it need to be updated for functionality or security? Will the same code still function properly in a PHP version 7 environment?
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.