Search found 9 matches

by sendy
Thu Jan 03, 2013 7:00 am
Forum: PHP coding => General
Topic: PHP Coding Help
Replies: 6
Views: 3007

Re: PHP Coding Help

mind if u show what have u done so far?
by sendy
Wed Jan 02, 2013 8:59 pm
Forum: PHP coding => General
Topic: OOP design questions
Replies: 4
Views: 2491

Re: OOP design questions

I think you are confusing things for yourself - you shouldn't have one class per product, that is not the idea of OOP. As you already have a product class, then run all your methods for anything product related within that class. Okay, i think i will add those methods in the parent class(Product cl...
by sendy
Mon Dec 31, 2012 12:25 am
Forum: PHP coding => General
Topic: OOP design questions
Replies: 4
Views: 2491

Re: OOP design questions

PreetiGarg wrote:Use
methods(get_stock(), add_stock())
Its useful for you...
erm sorry sir, but should i add those methods using interface or just add it in the parent class?
by sendy
Sun Dec 30, 2012 11:11 pm
Forum: PHP coding => General
Topic: OOP design questions
Replies: 4
Views: 2491

OOP design questions

hi guys, i want to ask questions for OOP designs, i want to practice to make online shop i have some designs in my mind: - Product class as base class for other specific product, it has(all protected) id,price, get_id(), get_price() - Specific product class, example T-shirt, it will extends Product,...
by sendy
Sun Dec 30, 2012 11:04 pm
Forum: mySQL & php coding
Topic: database design
Replies: 1
Views: 1416

database design

hi guys, i want to practice , so i decide to make a simple e-commerce fashion online shop. In my mind, i have database designs: 1. Table for product which have product_id, type(such as t-shirt, shirt, etc), price, size(if the product is t-shirt or anything that has a size) 2. Table for selling log, ...
by sendy
Sat Dec 22, 2012 7:19 am
Forum: PHP coding => General
Topic: problem to do the trick
Replies: 0
Views: 1412

problem to do the trick

example i have a form validation script which test if user has filled all of the fields. i set up the $errors variable, and test each field if they have errors or not $errors; $required_fields = array('username' , 'password', 'email'); foreach($required_fields as $field) { if(empty($_POST[$field])) ...
by sendy
Mon Nov 26, 2012 11:46 pm
Forum: PHP coding => General
Topic: How to put php script outside root?
Replies: 1
Views: 1047

Re: How to put php script outside root?

err nevermind i put it in the wrong directory, it works now :D
by sendy
Mon Nov 26, 2012 11:29 pm
Forum: PHP coding => General
Topic: How to put php script outside root?
Replies: 1
Views: 1047

How to put php script outside root?

I have searched google and didnt find any good explanation , i dont know if my keywords were wrong or what, but here's the question: how to put php script outside root? -assume i have root C:/xampp/htdocs -i put my html/php to display homepage in htdocs/home.php -then i put my database connection sc...
by sendy
Mon Nov 12, 2012 8:47 am
Forum: PHP coding => General
Topic: PDO or MYSQLi?
Replies: 3
Views: 910

PDO or MYSQLi?

hi guys, i dont know if its appropriate to post such topic in this forum but, here's the question: i read beginning PHP by m*tt doyle, it teaches PDO object for database, then yesterday i came to a discussion about "PDO vs MYSQLi", many say "use PDO" and many say "use MYSQLi". So, whats the best thi...