All Questions
54 questions
2
votes
1
answer
314
views
PHP OOP: Configuring MySQL DB & query w/ Twig
I decided to up my PHP game and learn some OOP.
I am re-building my website from procedural to OOP, but since I don't want to use a full framework I fiddle with some components.
As a router I use ...
7
votes
2
answers
229
views
Connect to MYSQL database in PHP with prepared statements
I have recently learned about using the functions exposed by the PDO extension. I created a db class which can handle common actions like create, update, delete and select. Is this method a correct ...
4
votes
2
answers
304
views
OOP - Contact Form PHP Backend - Procedural to OOP - Dynamic MySQL Prepared Statement PHP
I just converted procedural code to OOP code. Is there any performance or security issue with this code or what should I consider further?
interface
...
4
votes
2
answers
457
views
API for SQL queries with PHP PDO
I'm writing a very simple CRUD application, and I'm wondering if the way I'm using static methods throughout the code makes sense. I'd very much like to simplify ...
1
vote
2
answers
134
views
Repeated DB connection at max user connections
I am trying to create class with connect to mysql database. And if there is max number of connections I want to wait and try it again. I figured out, how it can works, but I am not sure, if its the ...
2
votes
1
answer
447
views
PHP Mad Libs with OOP and SQL
I've been learning PHP and I've just gotten into using OOP. Classes/objects/methods etc. My end goal is to take an old Mad libs program I did with PHP, and convert it to OOP. The gist of the project ...
4
votes
1
answer
25k
views
Basic object-oriented PHP login, logout, and registration scripts
I am new to OOP in general and have recently started trying to develop object-oriented PHP code instead of relying on a primarily procedural style, as this is a requirement for my studies. One part of ...
4
votes
1
answer
1k
views
PHP Application layers
I'm dealing with design layers of an application. Basically what I've so far are:
Business
Architecture: Client-Server
Techonologies: PHP+MySQL, HTML5, JS, 3rd parties APIs
My app
Data Sources: MySql ...
1
vote
2
answers
1k
views
Custom PDO wrapper class
I somewhat recently asked a question on here for advice on a PDO function that I had written. I got some good advice from a user, and went with it. I had used that function for about 3 months which is ...
8
votes
1
answer
222
views
A PHP API which has an endpoint for processing a user's facebook login details
I'm working on a PHP API for my angular JS Phonegap application.
At the moment I'm focusing on working with a user's facebook public profile data.
I'll explain the process a little first:
The user ...
5
votes
2
answers
9k
views
PHP MySQL PDO Database Class
Please let me know if any improvements could be made to my PHP PDO MySQL Class.
...
2
votes
2
answers
879
views
CRUD operations for a patient database
My code performs CRUD operations in PHP using OOP and dynamic queries. How can I completely separate HTML tables from this code?
Db.php
...
3
votes
3
answers
205
views
An online store, being converted from procedural to OOP
I just start to learn OOP, and it's far more interesting than procedural style.
I have a complete working online store written in procedural style. After realizing that my code is becoming very huge ...
3
votes
1
answer
163
views
OOP PHP for handling upvoting
kinda new to OOP, and I wanna know if i'm heading into the right direction. Also I should mention I'm not using AJAX
AnswerVoteManager.php
...
1
vote
2
answers
103
views
One object to handle all my database manipulation needs
I have created an object to handle all my database manipulation needs. Here is my object constructor and one of its functions:
...