Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating A Database Driven Website 1.Setting Up Your Web Server 2.Creating a Database 3.Creating a Webpage to Display Information From a Database 4.Creating.

Similar presentations


Presentation on theme: "Creating A Database Driven Website 1.Setting Up Your Web Server 2.Creating a Database 3.Creating a Webpage to Display Information From a Database 4.Creating."— Presentation transcript:

1 Creating A Database Driven Website 1.Setting Up Your Web Server 2.Creating a Database 3.Creating a Webpage to Display Information From a Database 4.Creating a form to Add information to a Database 5.Registering a Domain Name 6.Associating a Domain Name to Your Server

2 Visit http://domainsforauthors.com/ to setup a free websitehttp://domainsforauthors.com/

3

4

5

6

7 Your URL: http://demo.domainsforauthors.comhttp://demo.domainsforauthors.com

8 Cpanel URL: http://cpanel.domainsforauthors.com/http://cpanel.domainsforauthors.com/

9

10

11

12

13

14

15

16 http://cis3630.org/donotuse.html Title descriptive of the page's contents or purpose Your content goes here

17

18

19 Cpanel URL: http://cpanel.domainsforauthors.com/http://cpanel.domainsforauthors.com/

20

21

22

23

24

25

26 CREATE TABLE IF NOT EXISTS `students` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `url` varchar(100) NOT NULL, `added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `name` (`name`), KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=128 ; INSERT INTO `students` (`id`, `name`, `email`, `url`, `added`) VALUES (2, 'Ira Cross', 'iracross@gmail.com', '', '2015-09-17 18:39:55'), (3, 'Anna Rios', 'annarios@gmail.com', 'http://annarios.domainsforauthors.com/', '2015-10-27 22:43:00'), (4, 'Troy Johnson', 'Troy.Johnson@baruch.cuny.edu', 'http://demo.domainsforauthors.com', '2015-10-27 23:01:54'), (5, 'Wonder Woman', 'wonder@woman.com', 'http://www.dccomics.com/characters/wonder-woman', '2015-10-27 23:50:28'), (1, 'Junjie Low', 'junjiel@aol.com', '', '2015-10-28 22:44:18');

27

28

29 <?php $servername = "sql305.domainsforauthors.com"; $username = "dmnsf_16833743"; $password = "your_password"; $dbname = "dmnsf_16363720_database"; ?> Create new a file call it database-connect.php

30 Create a new file called students.php Student Demo Page Student Demo Page <?php include('database-connect.php'); // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: ". $conn->connect_error); } $sql = "SELECT id,name,email,url,added FROM students"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo $row["id"]. $row["name"]. $row["website"]. " "; } } else { echo "0 results"; } $conn->close(); ?>

31 Create a php file called add-student.php You may download the HTML here: http://cis3630.org/add-student.php-file.txthttp://cis3630.org/add-student.php-file.txt

32

33 Registering a Domain Name

34

35

36

37

38 You will be presented with multiple screens attempting to up sell you on with multiple, typically unneeded products. Registering 2 domain names cost $19.98 via Network Solutions

39

40

41

42

43

44 Remember, you need to change the nameservers on a domain via registrar control panel BEFORE adding it to your account, it may take 24 to 72 hours to completely update the nameservers (it usually does not take that long): Please verify your nameservers and/or change them to: ns1.byet.org ns2.byet.org ns3.byet.org ns4.byet.org ns5.byet.org The nameservers are changed via your domain registrar [in our case Network Solutions] control panel, NOT your hosting control panel [in our case domainsforauthors.com]. With free domainsforauthors account name servers MUST be set first, before adding the domain here in control panel.

45

46 After ___ hours http://studentdemo.org now pointa to the web site hosted at domainforauthors.comhttp://studentdemo.org For SEO reasons previously discussed you should stop using the original URL in this case Use http://studentdemo.orghttp://studentdemo.org Stop using http://demo.domainsforauthors.com

47 Insert screen shot of classdemo.org


Download ppt "Creating A Database Driven Website 1.Setting Up Your Web Server 2.Creating a Database 3.Creating a Webpage to Display Information From a Database 4.Creating."

Similar presentations


Ads by Google