Your SlideShare is downloading. ×
PHP Day 09 Geshan Manandhar Developer, Young Innovations Private Limited www.geshanmanandhar.com http://www.php.net   http...
Classes and Objects <ul><li>Objects mirror real life objects. </li></ul><ul><li>OO programming focuses on what and how of ...
A simple person class <ul><li><?php </li></ul><ul><li>class person { </li></ul><ul><li>public $name;  //public by default ...
Person Class contd. <ul><li>public function get_name() { </li></ul><ul><li>return $this->name; </li></ul><ul><li>} </li></...
Instance/object of person class <ul><li><?php include(&quot;class_person.php&quot;); ?> </li></ul><ul><li><html> </li></ul...
Register at 000Webhost <ul><li>Register at  000webhost.com . </li></ul><ul><li>Wait for the triggered email. </li></ul>
Registration at 000Webhost
Cpanel at 000webshot
File Manger
Uploaded files form net2ftp
Or use a FTP Client  <ul><li>Fireftp is a add on to Firefox, download at  https://addons.mozilla.org/en-US/firefox/addon/6...
FireFTP
Fire FTP In action
FileZilla
MYSQL Database creation
MYSQL database created
PHPMyAdmin of 000webhost
Now edit your connection file <ul><li>Edit your connection.php or conn_db.php file to suit the setting as provided in the ...
Access to your website <ul><li>http://your-registered-name.net23.net </li></ul><ul><li>Or your .com.np. </li></ul>
Questions
Get Started register <ul><li>Register at  000webhost.com </li></ul><ul><li>Upload your files, test them on a live web serv...
Upcoming SlideShare
Loading in...5
×

09 Oo Php Register

2,484

Published on

Day 9 Simple Object oriented PHP concepts

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,484
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "09 Oo Php Register"

  1. 1. PHP Day 09 Geshan Manandhar Developer, Young Innovations Private Limited www.geshanmanandhar.com http://www.php.net http://www.mysql.com
  2. 2. Classes and Objects <ul><li>Objects mirror real life objects. </li></ul><ul><li>OO programming focuses on what and how of programming rather that just how. </li></ul><ul><li>Classes are the blueprint and objects/instance are the implementation of the classes. </li></ul><ul><li>They help us to code programs as we function in real life. </li></ul>
  3. 3. A simple person class <ul><li><?php </li></ul><ul><li>class person { </li></ul><ul><li>public $name; //public by default </li></ul><ul><li>public $height; </li></ul><ul><li>private $pinn_number; </li></ul><ul><li>function __construct($persons_name) { </li></ul><ul><li>//constructor </li></ul><ul><li>$this->name = $persons_name; </li></ul><ul><li>} </li></ul><ul><li>function set_name($new_name) { </li></ul><ul><li>$this->name = $new_name; </li></ul><ul><li>} </li></ul><ul><li>//contd… </li></ul>
  4. 4. Person Class contd. <ul><li>public function get_name() { </li></ul><ul><li>return $this->name; </li></ul><ul><li>} </li></ul><ul><li>function set_pinn_number($new_pinn){ </li></ul><ul><li>$this->pinn_number = $new_pinn; </li></ul><ul><li>} </li></ul><ul><li>function get_pinn_number(){ </li></ul><ul><li>return $this->pinn_number; </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>?> </li></ul>
  5. 5. Instance/object of person class <ul><li><?php include(&quot;class_person.php&quot;); ?> </li></ul><ul><li><html> </li></ul><ul><li><head> </li></ul><ul><li><title>PHP Class Implementation</title> </li></ul><ul><li></head> </li></ul><ul><li><body> </li></ul><ul><li><?php </li></ul><ul><li>$ram = new person(&quot;Ram Krishna Maharjan&quot;); </li></ul><ul><li>$shyam = new person(&quot;Shayam Prashad Karki&quot;); </li></ul><ul><li>$ram->set_name(&quot;Ram Kumar Maharjan&quot;); </li></ul><ul><li>$shyam->set_name(&quot;Shyam Karki&quot;); </li></ul><ul><li>print &quot;Ram's full name: &quot; . $ram->get_name(); </li></ul><ul><li>print &quot;<br>Shyam's full name: &quot; . $shyam->get_name(); </li></ul><ul><li>?> More at http://www.killerphp.com/tutorials/object-oriented-php/ </li></ul>
  6. 6. Register at 000Webhost <ul><li>Register at 000webhost.com . </li></ul><ul><li>Wait for the triggered email. </li></ul>
  7. 7. Registration at 000Webhost
  8. 8. Cpanel at 000webshot
  9. 9. File Manger
  10. 10. Uploaded files form net2ftp
  11. 11. Or use a FTP Client <ul><li>Fireftp is a add on to Firefox, download at https://addons.mozilla.org/en-US/firefox/addon/684 </li></ul><ul><li>FileZilla is a free FTP, download at http://filezilla-project.org/download.php?type=client </li></ul><ul><li>There are other FTP clients as well </li></ul><ul><li>I recommend above two as they are free. </li></ul>
  12. 12. FireFTP
  13. 13. Fire FTP In action
  14. 14. FileZilla
  15. 15. MYSQL Database creation
  16. 16. MYSQL database created
  17. 17. PHPMyAdmin of 000webhost
  18. 18. Now edit your connection file <ul><li>Edit your connection.php or conn_db.php file to suit the setting as provided in the registration. </li></ul>
  19. 19. Access to your website <ul><li>http://your-registered-name.net23.net </li></ul><ul><li>Or your .com.np. </li></ul>
  20. 20. Questions
  21. 21. Get Started register <ul><li>Register at 000webhost.com </li></ul><ul><li>Upload your files, test them on a live web server. </li></ul>Get Started register <ul><li>Register at 000webhost.com </li></ul><ul><li>Upload your files, test them on a live web server. </li></ul>

×