-1
votes
0answers
29 views

Object Oriented PHP - mysql database manipulation [closed]

Been working with this code but it won't run. Please help me find the problem with this. THis is my class : <?php class mysqlcon { private $connection; private $database; public $query; ...
1
vote
1answer
42 views

autoloader class fine tune to be usable in every project

I'm open to any advice to help improve this code for general use. /** * * This code was created by Joshua Getner. * @license http://opensource.org/licenses/bsd-license.php BSD * * */ namespace ...
2
votes
2answers
78 views

PDO database class review

I've taken this class and made it my own but I'm curious to know what other think of it? Are there things I'm missing? Anything you can recommend? class Database { private $host = ''; private ...
4
votes
1answer
183 views

PHP Extending PDO Class

I am trying to convert myself from using mysql extension to using PDO, with that being said I was curious if I am going about this the right way. I have a custom logging system that I built I am ...
0
votes
2answers
73 views

PHP PDO Custom class ple

i created a database class from a good tutorial and wanted to put it up here so it would get in some search results. it took me about 2 days to find it. also i added a few custom functions to it.. ...
0
votes
2answers
58 views

Consistent implementation of PHP class constants (arrays not allowed)

I'm currently writing a class: final class MyTestClass { const URL = 'http://www.example.org'; private static $MY_ARRAY = array('...'); // since this is not allowed // const MY_ARRAY = ...
0
votes
1answer
47 views

Is declaring a property as `public` insecure?

I posted a question few weeks back, on making a PHP Login Script. Most of you guys told me not to use global variables and especially for something like MySQLi connection object as it may be insecure. ...
0
votes
0answers
254 views

Good, flexible and secure MVC router PHP

I have developed a new router after having learnt a lot from my previous attempts and I will be using this in sites I make from now on. In a previous question, the issue of REQUEST_URI being too ...
4
votes
3answers
184 views

OOP Classes, how to put class in class

I've started to learn an OOP and I've built a class called accountactions, and I would like to know if I did a good job writing it. The class is in the file: accountactions.class.php. <?php ...
2
votes
1answer
130 views

Please review my classes - Database, User and Validator

I am very new to OOP and I am sure this code is very, very bad. I will appreciate if you review my classes and give me some advice to improve them. Any recommendations are welcome. I have also put ...
0
votes
0answers
98 views

Translation class with database back-end

From reading the faq, basically I would like if everyone could give me advice on all of the things enunciated there about my code (mainly design pattern usage and security): Best practices and ...
4
votes
2answers
263 views

Validation Class - Feedback Welcome!

I have written a Validation and Form class in PHP. Validation class allow you to define the rules of each field and a error message. Form class allow you to get a error message and also allow you ...
3
votes
1answer
499 views

How to improve Try…Catch Block for PDO?

I have written a PDO wrapper and a class file like a model. So far, it's looking so good! I am just confuse where I should put Try...Catch block - Would it be better to place in PDO wrapper ...
2
votes
1answer
244 views

Help improve my first PHP class

I recently started to learn more about OOP in PHP and I created a website for testing. I have 4 classes: database, user, posts, comments. This is a simple database.class.php: class DB { ...
1
vote
1answer
282 views

PHP Config Class

I'm working on a config class for PHP, where I can easily bring in config options. Any improvements/suggestions are appreciated. Example usage: echo Config::get('database.host'); // Returns: ...

1 2 3
15 30 50 per page