Your SlideShare is downloading. ×
0
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Linux Apache Php Mysql Lamp1273

1,728

Published on

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
1,728
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
72
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Welcome to AJAX with LAMP Workshop <ul><ul><li>Hussain Fakhruddin </li></ul></ul><ul><ul><li>[email_address] </li></ul></ul>
  • 2. Overview of LAMP <ul><li>Introduction </li></ul><ul><li>Client Server Model, What are web servers </li></ul><ul><li>What is PHP? Why Use PHP? </li></ul><ul><li>PHP Crash Course </li></ul><ul><li>Language Reference: Variables, Controls, Loops etc. </li></ul>
  • 3. Introduction
  • 4. What is PHP <ul><li>PHP: Hypertext Preprocessor </li></ul><ul><li>Why not HTP or HP or HPP? </li></ul><ul><li>Recursive Acronym </li></ul><ul><li>An acronym in which the first letter of the first word is represented by the acronym itself. </li></ul><ul><li>GNU = “GNU is NOT UNIX” </li></ul><ul><li>PHP: PHP Hypertext Preprocessor </li></ul>
  • 5. Why Use PHP <ul><li>If you want to add dynamic content to your pages </li></ul><ul><li>If you want to make your pages easier to maintain </li></ul><ul><li>If you’re learning your first &quot;real&quot; computing language </li></ul><ul><li>If you need a solution that’s portable across multiple platforms (e.g. Red Hat Linux to Windows 2000) </li></ul><ul><li>If you like free software or need a free solution </li></ul><ul><li>Examples of uses of PHP & MySQL: </li></ul><ul><ul><li>Sign-up Forms </li></ul></ul><ul><ul><li>Surveys </li></ul></ul><ul><ul><li>Polls </li></ul></ul><ul><ul><li>Email a Postcard </li></ul></ul><ul><ul><li>Content Management </li></ul></ul>
  • 6. What you need to start a website? <ul><li>What you need? </li></ul><ul><ul><li>Server </li></ul></ul><ul><ul><li>PHP parser </li></ul></ul><ul><ul><li>Configurations. </li></ul></ul>
  • 7. Some basic configurations <ul><li>Save all your file in </li></ul><ul><li>Run from browser as </li></ul><ul><ul><li>http://localhost/ < FILENAME > </li></ul></ul><ul><li>Open any Text Editor and start coding </li></ul>
  • 8. PHP Crash Course (cont.) <ul><li>Embedding PHP in HTML </li></ul><ul><ul><ul><li><html> </li></ul></ul></ul><ul><ul><ul><li><body> </li></ul></ul></ul><ul><ul><ul><li><strong>Hello World!</strong><br /> </li></ul></ul></ul><ul><ul><ul><li><?php </li></ul></ul></ul><ul><ul><ul><ul><li>echo ‘My name is HussuLinux!’; </li></ul></ul></ul></ul><ul><ul><ul><li>?> </li></ul></ul></ul><ul><ul><ul><li></body> </li></ul></ul></ul><ul><ul><ul><li></html> </li></ul></ul></ul><ul><li>PHP tag styles: </li></ul><ul><li>XML: <?php ?>, Short: <? ?>, ASP: <% %> </li></ul><ul><li>Script: <script language=‘php’></script> </li></ul>
  • 9. PHP Crash Course (cont.) <ul><li>Adding dynamic content by adding the date to the page. </li></ul><ul><ul><ul><li><html> </li></ul></ul></ul><ul><ul><ul><li><body> </li></ul></ul></ul><ul><ul><ul><li><strong>Hello World!</strong><br /> </li></ul></ul></ul><ul><ul><ul><li><? </li></ul></ul></ul><ul><ul><ul><ul><li>echo ‘Today is’; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>echo date(‘H:i jS F’); </li></ul></ul></ul></ul><ul><ul><ul><li>?> </li></ul></ul></ul><ul><ul><ul><li></body> </li></ul></ul></ul><ul><ul><ul><li></html> </li></ul></ul></ul><ul><li>Date() http://www.php.net/manual/en/function.date.php </li></ul><ul><li>PHP Function Reference http://www.php.net/manual/en/funcref.php </li></ul><ul><li>One useful function is phpinfo(). Gives system information so you can quickly find out what’s on your machine. </li></ul>
  • 10. Using PHP to Query a MySQL Database <ul><li><html> </li></ul><ul><li><body> </li></ul><ul><li><h1>A List of Users Who Have Signed Up For OscarPool</h1> </li></ul><ul><li><? </li></ul><ul><li>$dbh = mysql_connect(&quot;localhost&quot;,“dbusername&quot;,“dbpassword&quot;) </li></ul><ul><li> or die(“Couldn't connect to database.&quot;); </li></ul><ul><li>$db = mysql_select_db(“dbname&quot;, $dbh) </li></ul><ul><li> or die(“Couldn't select database.&quot;); </li></ul><ul><li>$sql = “SELECT username, email FROM oscarpool”; </li></ul><ul><li>$result = mysql_query($sql, $dbh) </li></ul><ul><li>or die(“Something is wrong with your SQL statement.&quot;); </li></ul><ul><li>while ($row = mysql_fetch_array($result)) { </li></ul><ul><li>$username = $row[‘username’]; </li></ul><ul><li>$email = $row[‘email’]; </li></ul><ul><li>echo ‘<a href=“mailto:’.$email.’”>’.$username.’</a><br /> ’; </li></ul><ul><li>} </li></ul><ul><li>?> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul>
  • 11. AJAX
  • 12. What's Ajax the buzzword <ul><li>Stands for Asynchronous JavaScript and XML </li></ul><ul><li>Its a web development technique. </li></ul><ul><li>Its Faster and Interactive. </li></ul>
  • 13. Who uses Ajax? <ul><li>Gmail </li></ul><ul><li>Google Maps </li></ul><ul><li>Meebo </li></ul><ul><li>Ebuddy </li></ul><ul><li>And many more </li></ul>
  • 14. Technology behind AJAX
  • 15. Why Ajax? <ul><li>Faster, </li></ul><ul><li>Increase Interactivity </li></ul><ul><li>Rich User Experience </li></ul>
  • 16. Steps to AJAX <ul><li>Create a XMLHttpRequest request object </li></ul><ul><li>Tell the request object where to send the request </li></ul><ul><li>Tell the object what to do when the request is answered </li></ul><ul><li>Tell the object to make a request </li></ul>
  • 17. Lets Code <ul><li><script language = &quot;javascript&quot;> </li></ul><ul><li>var XMLHttpRequestObject = false; </li></ul><ul><li>if (window.XMLHttpRequest) { </li></ul><ul><li>XMLHttpRequestObject = new XMLHttpRequest (); </li></ul><ul><li>} </li></ul><ul><li>else if (window.ActiveXObject) { </li></ul><ul><li>XMLHttpRequestObject = new ActiveXObject (&quot;Microsoft.XMLHTTP&quot;); </li></ul><ul><li>} </li></ul><ul><li>if (XMLHttpRequestObject) { </li></ul><ul><li>document.write (&quot;<h1>Welcome to AJAX</h1>&quot;); </li></ul><ul><li>} </li></ul><ul><li></script> </li></ul>
  • 18. PHP & MySQL Resources <ul><li>Web Sites </li></ul><ul><ul><li>http://www.php.net/ </li></ul></ul><ul><ul><li>http://www.phpbuilder.com/ </li></ul></ul><ul><ul><li>http://www.devshed.com/ </li></ul></ul><ul><ul><li>http://www.phpmyadmin.net/ </li></ul></ul><ul><ul><li>http://www.hotscripts.com/PHP/ </li></ul></ul><ul><ul><li>http://www.mysql.com/ </li></ul></ul><ul><ul><li>http://www.owasp.org/ </li></ul></ul><ul><li>Books </li></ul><ul><ul><li>PHP and MySQL Web Development 2 nd Edition, Welling & Thomson </li></ul></ul><ul><ul><li>Web Database Applications with PHP & MySQL, O’Reilly Publishers </li></ul></ul><ul><ul><li>PHP Cookbook, O’Reilly Publishers </li></ul></ul><ul><ul><li>MySQL Cookbook, O’Reilly Publishers </li></ul></ul>
  • 19. My special Thanks to: <ul><li>David Olsen ( [email_address] ) for his help in presentation's content. </li></ul><ul><li>PHP Freaks ( http://www.phpfreaks.com ) This is where I learnt PHP from </li></ul>

×