Search the Community
Showing results for tags 'php oop'.
Hello everyone I wanted you all to look at this jQuery code to see how can I pass the data to the php file after the validation. form.js
Hi, I have some experience with PHP but i decided to move on to OOP (and design patterns). The idea is to read things that i find relative and try and implementing it in a system. I wanted something that will need OOP and can be something fun and i thought of an idea. The problem is that because of years of a mish-mash code where html + JS+PHP all together + control C and control V habits, i find it difficult to begin. I want to do it the "right way" and not middle way - to use design patterns where they are needed and do a correct PHP. Will be glad for tips about the beginning. My idea (the simple) I want to build a site where people can register and choose who are they friends (from other registered people) then a person can open an event (for example: birthday, wedding, baby shower) and under the event he can list presents he really wants. He can add links to specific items and pictures. His friends will see it and they can check out gifts that they want to buy the user that opened the event wont see who checked what but other guests will see it, so they wont buy the same gift also if a gift is expensive, people can partially check it with the amount of money they can give and when the amount is reached, an email will be send to all the pariticipants in the gift The reason for the idea is all those baby showers with the same gifts that people dont want or need to exchange, moving to new home parties where people really need small stuff but receive things they dont need and generally for people who want to buy an enjoyable gift but dont know what the person needs. The idea (complicated) Login with facebook different gift levels - really need, my wish, i will enjoy an ability to see what the person liked or got so even if he didnt open an event, you know what to give him different visibility levels - the person doesnt know who will buy what, the person knows what was checked out but not who did it, full visibility chat between guests so they can discuss the list and so on... For now i have questions, just to make sure i got this correct: 1. Design patterns are basically ideas of a correct class structure that is used for a specific problem. Each design pattern solves some problems. For example singleton pattern is basically an idea on how to create a DB class. 2. The problem that i am currently unable to find a solution for - is what is the correct way to implement GUI. I saw couple of ways: 1. The old html page with php embeded into it - this i want to avoid 2. Some people just gather all the information they need from the server and send this as jason and implement the GUI only on a client view- i am not sure why i dont like this idea, but i dont. 3. I saw an example of a class, called "form" that basically used a php class that echo all the html needed for a form - it is a very long way to implement something rather simple, and i am still not sure if this is the correct way 4. Something else? 3. What do you think of my idea, how to begin implement it? The main concern is to make something that i wont be able to make bigger in the future. 4. Mysqli VS PDO - i am using Mysql server and i am familiar with Mysqli. Is it really better to learn PDO or i can stick with the Mysqli library?