mysqli connection adobe dreamweaver cs5

14
1

Upload: mohammed-hussein

Post on 18-Dec-2014

1.567 views

Category:

Education


8 download

DESCRIPTION

MysqliConnection via PHP Create PHP file connection to connect database. DB connection via Dreamweaver.

TRANSCRIPT

Page 1: Mysqli Connection Adobe  Dreamweaver CS5

1

Page 2: Mysqli Connection Adobe  Dreamweaver CS5

Outline

Mysqli Connection via PHP

Create PHP file connection to connect database.

DB connection via Dreamweaver.

By: Eng\ Mohammed Hussein 2

Page 3: Mysqli Connection Adobe  Dreamweaver CS5

http://localhost/

By: Eng\ Mohammed Hussein 3

Page 4: Mysqli Connection Adobe  Dreamweaver CS5

Mysql and Mysqli

The Mysql_* and Mysqli_* family of functions were both

created to give a programmer methods of interacting with a

MySQL database using PHP.

For instance, when we want to connect to MySQL and open

communication to it, we use mysqli_connect. Then to close

that same connection we use musqli_close Not very

complicated.

After added Mysqli family of functions with PHP5, it has

improved efficiency, speed, code, security and interfacing due

to the way the new model is structured.

By: Eng\ Mohammed Hussein 4

Page 5: Mysqli Connection Adobe  Dreamweaver CS5

http://localhost/phpmyadmin/

By: Eng\ Mohammed Hussein 5

Page 6: Mysqli Connection Adobe  Dreamweaver CS5

Login to phpDb Database

By: Eng\ Mohammed Hussein 6

Page 7: Mysqli Connection Adobe  Dreamweaver CS5

PHP file Connection

Create PHP file connection to connect database

By: Eng\ Mohammed Hussein 7

Page 8: Mysqli Connection Adobe  Dreamweaver CS5

PHP Sessions

<?php

session_start();

if(isset($_SESSION['views']))

$_SESSION['views']=$_SESSION['views']+1;

else

$_SESSION['views']=1;

echo "Views=". $_SESSION['views'];

?>

<html>

<body>

<br>

<?php

echo "This is inside PHP<br>";

echo "Hello World!<br>";

$q= "How Are You Every Body?";

Echo $q;

?>

</body>

</html>

F5

Google Chrome

1

2

8By: Eng\ Mohammed Hussein

Page 9: Mysqli Connection Adobe  Dreamweaver CS5

Include PHP file connection & Query

Calling php file connection inside index.php code.

By: Eng\ Mohammed Hussein 9

Page 10: Mysqli Connection Adobe  Dreamweaver CS5

Query calling back

Using $body variable inside index.php code

By: Eng\ Mohammed Hussein 10

Page 11: Mysqli Connection Adobe  Dreamweaver CS5

DB connection via Dreamweaver

By: Eng\ Mohammed Hussein 11

Page 12: Mysqli Connection Adobe  Dreamweaver CS5

Recordset using Dreamweaver

By: Eng\ Mohammed Hussein 12

Page 13: Mysqli Connection Adobe  Dreamweaver CS5

Import data using Dreamweaver

By: Eng\ Mohammed Hussein 13