guys i really followed this set of tutorials online , its to help me understand the oops concept :
heres the link for one of the videos [URL=”https://www.youtube.com/watch?v=uF-L7ympvfw”]https://www.youtube.com/watch?v=uF-L7ympvfw
now i typed out all the code as that guy had done in the video , but i am still getting errors , so i kind of need some help here , for someone to check my code . I got the “select” query working somehow , though the update query is not working .
i know debugging help is usually not encouraged on forum , but i would really really be grateful and would buy u a beer if you could help me debug this :
heres the link to what i’ve done on git : [URL=”https://github.com/gautamz07/oopslogin”]https://github.com/gautamz07/oopslogin
now in mysql you will have to create a table :
with the following attributes :
id fname lname email
and don’t forget to change the db name in index.php if you run the code.
also for the update query chage the index.php file code to as follows :
[CODE]<?php
include(‘./class.database.php’);
include(‘./class.table.php’);
include(‘./user.class.php’);
$dbo = database::getInstance();
$dbo->connect(‘localhost’, ‘root’, ” , ‘zakoo’);
$user = new user();
// $temp = array(1);
$data = array(“fname”=> “pandit” , “lname”=>”Jawaharlal” , “email”=> “[email protected]”);
// $user->load(‘2’);
$user->bind($data);
$user->store();
// echo “{$user->fname} {$user->lname}”;
?>
now one other difference you need to know if you do this is the guy in the video has used mysqli where as i am using mysql , i know its a crime to be using it , but still for this demo thinggi its ok ?
Gautam.