How to Make a Simple Dynamic Web (PHP and MySQL) for beginners

Dynamic Web is a website where a user (client) can change the content of a specific page using a browser and the interaction between the user and the server is very complex.
Requests from users can be processed by the server which are then displayed with different contents vary according to the program flow. dynamic web allows you to change the data through the admin page without having to change kodingannya.
to create dynamic web language you can use php and mysql as the databas.



1. First you must have an application called xampp ie as a stand-alone server (localhost), you can download on the internet, to install it quite easy, just follow the instructions.


2. Once you have successfully installed the xampp, open the app and start "Apache" and "MySQL" and then open your browser recommended Firefox or Chrome. Then Type localhost / phpmyadmin in the address bar to process the mysql database

  3. Once the page appears phpMyAdmin, you first create a database with the name db_web, and then create a table for admin type the code below in SQL tab:
create table admin ( 
username varchar(15) not null primary key,
password varchar(15) not null,
level varchar(15) not null 
)


4. to make the web, you must first create a homepage first, open the editor like notepad or notepad ++ etc and then type / copy and paste the code below and name the file "index.php"

<!DOCTYPE HTML PUBLIC>  
<html>  
<head>  
<title>Kerangka Web</title>  
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<link href="style.css" rel="stylesheet" type="text/css"> 
</head>  
  
<body>  
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">  
  <tr bgcolor="gray">  
    <td height="100" colspan="2"></td>  
  </tr>  
  <tr bgcolor="black">  
    <td colspan="2"><marquee onmouseover="this.stop()" onmouseout="this.start()" truespeed="true" scrollamount="1" scrolldelay="40" direction="left">  
    <strong><div id="login">Selamat Datang Di Website Kami, Website Ini Masih Dalam Tahap Pembuatan</div></strong>  
</marquee>  


</td>  

  </tr>  
  <tr>  
    <td width="200" height="600" valign="top" bgcolor="gray"><table width="200" border="0" cellspacing="0" cellpadding="0">  
      <tr>  
        <td><form name="form1" method="post" action="cek_login.php">  
          <table width="200" border="0" cellspacing="0" cellpadding="2">  
            <tr bgcolor="#003366">  
              <td height="30" colspan="2"><div align="center"><div id="login"><strong>Login Admin </strong></div></div></td>  
              </tr>  
            <tr>  
              <td width="74" height="30"><b>Username</b></td>  
              <td width="126">:   
                <input name="username" type="text" id="username" size="10"></td>  
            </tr>  
            <tr>  
              <td height="30"><b>Password</b></td>  
              <td>:   
                <input name="password" type="password" id="password" size="10"></td>  
            </tr>  
            <tr>  
              <td height="30">&nbsp;</td>  
              <td><input type="submit" name="Submit" value="Login"></td> 
            </tr>  
          </table>  
        </form>
       </td>  
      </tr>  
      <tr>  
        <td><div id="kiri">
<div id="login">
<p><center><b>PROFIL</center></p> 
<p>Nama : SAYHRUL RAMADAN </p>
<p>Web   : SYRAU.BLOGSPOT.CO.ID</p></b>
</div>
</div>
</td>  
      </tr>  
    </table> 
</td>   
    <td valign="top">&nbsp;</td>  
  </tr>  
  <tr bgcolor="black">  
    <td height="80" colspan="2"><div id="login"><center>Copyright 2015 <br>Design : Banu Ari Ramadhan</div></td>  
  </tr>  
</table>  
</body>  
</html>


5. To make the web interface looks nice, create css design for the web create a file called "style.css" and then type / copy and paste the code below:

explanation:
#kiri is to the left side of web design
#login is to design the writing on the login form


6. To see the results save the file "index.php" and "style.css" in C:> / xampp / htdocs / web (create a new folder named web) and then run it through your browser address bar by typing: localhost / web / index .php
then see the results ..
note: do not forget to activate your xampp (start Apache and MySQL)

you've made a simple homepage for the data to be displayed later ..
The next section I will post how to create connections to make the admin page

Thank you for visiting :)
 

Share this

Related Posts

Previous
Next Post »