TheDemoSite.co.uk  sample code: ASP and MySQL - PHP and MySQL - PHP and MsSQL - phpFormMailer - ASP Contact form  

PHP code examples with database connectivity

PHP code examples with database connectivity
PHP and MySQL
sample code

Just examples of PHP code, linking to your MySQL database and JavaScript.
1. Home | 2. Poloniex | 3. Add a User | 4. Login | 5. Get your db online

PHP code examples with database connectivity

1. Home

Follow the links above, in sequence, for an example of a username & password login web based system, developed using PHP, JavaScript and a MySQL database.

All files on this site are generated using a default header and footer using <?php include("afilename.inc"); ?>  This page you are viewing is generated from the following three files:

index.php

<?php
$page_title
="FREE example PHP code and online MySQL database - example username password protected site";
$page_keywords="example PHP code,free demo username and password example,PHP scripts,PHP hosting, free PHP code";
$page_desc="FREE example PHP code and a MySQL database. The example is a username and password protected site example";

include(
"header.inc");
?>
<center><big><strong>1. Home </strong></big></center>
</p>

<p align="center">Follow the links above, in sequence, for an example of a username &amp;
password login web based system, developed using PHP, JavaScript and a MySQL database.</p>

<p align="center">All files on this site are generated using a default header and footer
using &lt;?php include(&quot;afilename.inc&quot;); ?&gt;<font SIZE="1" COLOR="#000000">&nbsp;
</font>This page you are viewing is generated from the following three files:</p>
<div align="center"><center>

<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><p align="center"><small><strong>index.php</strong></small>

    <div align="left" style="border:solid 2px #0000FF; background:#EAEDFC; color:#000000; padding:2px; width:800px; height:300px; overflow:auto;">
        <?php show_source("index.php"); ?>
      </div>
      <p align="center"></td>
  </tr>
  <tr>
    <td width="100%"><div align="center"><center><table border="0" width="641" cellspacing="1"
    cellpadding="0" bgcolor="#000000">
    </table>
    </center></div>

<br><br>
<strong>header.inc</strong></p>

<div align="left" style="border:solid 2px #0000FF; background:#EAEDFC; color:#000000; padding:2px; width:800px; height:300px; overflow:auto;">
  <?php show_source("header.inc"); ?>
</div>
<p align="center"><br>
</p>
<p align="center"><strong>footer.inc</strong></p>
<div align="left" style="border:solid 2px #0000FF; background:#EAEDFC; color:#000000; padding:2px; width:800px; height:300px; overflow:auto;">
  <?php show_source("footer.inc"); ?>
</div>




        </td>
  </tr>
</table>
</center></div>

<p align="center">You can <a href="demo-code.zip">download the free zip here</a> which contains all the pages.
</p>
<?php include("footer.inc"); ?>



header.inc

<?php
if (!isset($page_title)) $page_title="PHP code and online MySQL database - example username password";
if (!isset(
$page_keywords)) $page_keywords="free PHP code, mysql sql";
if (!isset(
$page_desc)) $page_desc="FREE example PHP code and a MySQL database";
?>
<html>

<head>
<title><?php echo $page_title?></title>
<meta NAME="keywords" CONTENT="<?php echo $page_keywords?>">
<meta NAME="description" CONTENT="<?php echo $page_desc?>">
<meta NAME="Content-Language" CONTENT="english">
<meta name="Revisit-after" content="56 days">
<meta name="Distribution" content="Global">
<meta name="Copyright" content="Copyright © 1996-2008 Seiretto.com">
<meta NAME="ROBOTS" CONTENT="ALL">
<link rel="stylesheet" type="text/css" href="tds.css">
</head>

<body BACKGROUND="DiscoverBack.gif"
style="
    SCROLLBAR-ARROW-COLOR: #BBCCFF; 
    SCROLLBAR-TRACK-COLOR: #C9DAF7; 
    SCROLLBAR-FACE-COLOR:  #002163;"
TOPMARGIN="0" LEFTMARGIN="15" MARGINWIDTH="0" MARGINHEIGHT="0">
<div align="center"><center>

<strong><font color="#000000" face="Comic Sans MS">TheDemoSite.co.uk</font></strong>&nbsp; 
    sample code:&nbsp;<a href="http://asp.thedemosite.co.uk/">ASP and MySQL</a> 
    - <a href="http://php.thedemosite.co.uk/">PHP and MySQL</a> -
    <a href="http://asp.thedemosite.co.uk/mssql/">PHP and MsSQL</a>


    - <a href="http://thedemosite.co.uk/phpformmailer/">phpFormMailer</a> -
    <a href="http://asp.thedemosite.co.uk/asp_contact_email_form/asp_contact_email_form.asp">
    ASP Contact form</a>&nbsp;&nbsp;
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><p align="center"><img height="2" src="line.gif" width="99%" border="0"
    alt="PHP code examples with database connectivity"></td>
  </tr>
  <tr>
    <td width="100%"><img height="2" src="line.gif" width="99%" border="0"
    alt="PHP code examples with database connectivity"><div align="center"><center><table
    border="0" width="98%" cellspacing="0" cellpadding="0">
      <tr>
        <td style="width: 22%"><font face="Comic Sans MS"><big><strong>PHP and 
        MySQL<br></strong>sample code</big></font></td>
        <td><p align="center"><small>Just examples of <b>PHP</b> code, linking to your <b>MySQL</b>
        database and JavaScript.<br>
        <a href="index.php">1. Home</a> | <a href="thedatabase.php">2. Poloniex</a> | <a
        href="addauser.php">3. Add a User</a> | <a href="login.php">4. Login</a> | <a
        href="getyourowndbonline.php">5. Get your db online</a></small></td>
      </tr>
    </table>
    </center></div></td>
  </tr>
  <tr>
    <td width="100%"><p align="center"><img height="2" src="line.gif" width="99%" border="0"
    alt="PHP code examples with database connectivity"><br>
    </td>
  </tr>
</table>
</center></div>
</table>

<table border="0" width="100%">
  <tr>
    <td>


footer.inc

</td>
 <td width="170">
  <center> 
  <?php include("googleads.inc"); ?>
  </center>
 </td>
  </tr>
</table>


<p align="center"><br>
<img height="2" src="line.gif" width="730" border="0"><br>
<strong><font color="#000000" face="Comic Sans MS">TheDemoSite.co.uk</font></strong> is a
MySQL database and PHP FREE code example site hosted with: <br>
<b>Seiretto </b><strong><a href="http://www.seiretto.com/">UK web hosting</a></strong>
Copyright © 1996-2014 Seiretto.&nbsp; All rights reserved.
</p>
<p align="center">sample code:&nbsp;<a href="http://asp.thedemosite.co.uk/">ASP and MySQL</a> 
    - <a href="http://php.thedemosite.co.uk/">PHP and MySQL</a> -
    <a href="http://asp.thedemosite.co.uk/mssql/">PHP and MsSQL</a>


- <a href="http://thedemosite.co.uk/phpformmailer/">phpFormMailer</a> -
<a href="http://asp.thedemosite.co.uk/asp_contact_email_form/asp_contact_email_form.asp">
ASP Contact form</a><br><img height="2" src="line.gif" width="730" border="0"></p>
</body>
</html>

You can download the free zip here which contains all the pages.



TheDemoSite.co.uk is a MySQL database and PHP FREE code example site hosted with:
Seiretto UK web hosting Copyright © 1996-2014 Seiretto.  All rights reserved.

sample code: ASP and MySQL - PHP and MySQL - PHP and MsSQL - phpFormMailer - ASP Contact form