Menu Combo site, PHP-MYSQL
Course |
In the steps of this tutorial, I will be using the XAMPP
server for Windows ... |
Mars
2015
| |
this site includes
2 grupes of page |
|
1st
page:
index-display.php includes |
db-display.php and
dbd.php. |
1st General
Info: |
Connection Name
="$conmenu" Server Name = "localhost" User
Name = "root" Password = "" Database Name =
"a-data'" |
|
Database
Name = "a-data'" 1-Table Name =
"itemsdata" |
|
|
2nd page: index-combobox.php
includes db-combo.php and
dbc.php |
2nd General
Info: |
Connection Name
="$conmenu" Server Name = "localhost" User
Name = "root" Password = "" Database Name =
"a-bible_en'" |
|
Database
Name = "a-bible_en'" 1-Table Name =
"biblenewtable" |
| |
| |
|
If you wish to install a local testing server, you can download the
XAMPP package for Windows http://www.apachefriends.org/en/xampp.html
Once
XAMPP is a completely installed. XAMPP is an easy to install Apache
distribution containing MySQL, PHP and Perl. You can use the
XAMPP Control Panel to start your testing server.
- Click Start next to both Apache and MySQL to start the services.
Starting these services can take a few seconds. When it is complete,
'Running' will display beside each option.
To make your testing server start automatically
when your computer starts, you can check the Svc checkbox beside both
options. If the XAMPP Control Panel is not already running, go to
C:\xampp\control.exe to open the panel. |
1- XAMPP Control Panel
|
|
|
With your testing server now installed and running, there are a few
final steps you should take to make sure everything is configured to work
perfectly.
- Open a web browser such as Firefox or Internet Explorer.
- In the Address bar, enter http://localhost.
You should see a
XAMPP splash screen with language options.
- Choose your preferred language.
You should now see a confirmation
window informing you that 'You have successfully installed XAMPP on your
system' |
2-
List of Files
the php
+ sql files and Folders corresponding, stored at ...\\19-Course,
Menu Combo site, PHP-MYSQL\Menu Combo Folder the main File -
index-menu.php |
|
|
Defining a Dreamweaver
Site |
Once a testing server is set up, either locally or using
a remote hosting service, you will need to define a site for Dynamic
Development in Dreamweaver |
|
In Dreamweaver go to Site -> New Site.
Note:
you can edit an existing site definition by going to Site -> Manage
Sites. Select the site you wish to modify, then click the edit
button. |
|
Step 2: Enter the local
Information
In the
first section of the site definition, you will set the Local Information.
This sets the Site Name, and local path for files in your
site.
When using XAMPP in a windows system, it may be that the site
root is mapped to: C:\xampp\htdocs so the new site folder would be created under
that location: C:\xampp\htdocs\menu-site
In this screen shot, using DW CS6 on a Windows system with XAMPP
installed. you will set the Local Information. This sets the Site Name,
and local path for files in your site. Site
Name:
menu-site local Site Folder: C:\xampp\htdocs\menu-site |
|
|
The next setting is to connect to servers. In DW CS6 and above, this
done by selecting the servers section: |
|
|
and clicking the plus icon to define a new server
connection. at Basic tab, For the Name you can enter the same
name as the Site definition, When using a local testing server, set
Connect Using to "Local/Network" |
|
Set the Server Folder to the same location as the local
files set in the initial Site Settings. Server
Name:
menu-site connect
using:
Local/Network Server
Folder:
C:\xampp\htdocs\menu-site Web
URL:
http://localhost/menu-site |
|
|
at Advanced tab, |
Click the advanced button and set the Application model
to PHP / MySQL Server Model: PHP MySQL |
|
then click Save. Once the connection is
defined, there are check boxes to set the connection as a testing or
remote connection, check the testing option. |
|
and then Click Save, the Dreamweaver dialog box
display: |
|
Step 4:
Manage Sites |
you can edit an existing site definition by going to Site
-> Manage Sites. Your Sites: menu-site |
|
then click Done |
Setup the site's Testing Server and then click
OK |
|
|
|
n this section, we'll look into how to create a database.
A database is used to store information for your site. 2- Copy
a-adata file from
...\\19-Course, Menu Combo site, PHP-MYSQL\Menu Combo Folder to
folder C:\xampp\htdocs\menu-site 1- Copy a-bible_en.sql file from ...\\19-Course, Menu
Combo site, PHP-MYSQL\Menu Combo Folder to folder
C:\xampp\htdocs\menu-site |
Most web hosts use a control panel for managing your
site, in the control panel they will have a way to create a MySQL
Database. Once a database has been created, you can use phpMyAdmin to edit
it. |
phpMyAdmin is also available using most Local Testing
server packages like XAMPP. The Start pages for those server will have a
link to open phpMyAdmin.
In phpMyAdmin, go to the Import tab.
1- Use this .sql script (C:\xampp\htdocs\menu-site\a-data.sql)
to create the a-data database 2- Use this .sql script
(C:\xampp\htdocs\menu-site\a-bible_en.sql) to create the
a-bible_en database |
Step
1: import SQL files 1- On the import tab, Click the
chose file button, and select the a-data.sql file that you
downloaded, and click the Go
button to have the database created: |
|
Message about a-data.sql display: Import has been
succcessully ... |
|
he Database "a-data" stores 1 table:
itemsdata On the Structure tab, to be Displays: the
Table "itemsdata" of Database "a-data" |
|
|
2- On the import tab, Click the chose file button, and
select the a-bible_en.sql file that you downloaded, and click the Go button to have the database created: |
|
Message about a-Bible_en.sql display: Import has been
succcessully ... |
|
the Database "a-bible_en" stores 1 table:
biblenewtable On the Structure tab, to be Displays:
the Table "biblenewtable" of Database "a-bible_en" |
|
|
|
index-menu.php page
File |
Now that a site and a databases are created, a new
PHP file needs to be created and saved to the site |
Go to File -> New. In the File Creation dialog, select Blank Page.
From the page type section, select PHP and click the
create. |
|
|
Go to File -> Save. In the Save As option, enter
"index-combobox.php"
In the Where section, select the folder for
your site. |
|
|
Step 3: the Site has been
defined - testing server - Once the site has been
defined, at Dreamweaver - Dw display current Message: "This page
may have dynamically-related files that can only be discovered by the
server. Discover | Preferences. |
|
|
Step
4: Create Spry Menu |
A Menu Bar is a set of navigational menu buttons that
display submenus when a site visitor hovers over one of the buttons. Menu
Bars let you display a large amount of navigational information in a
compact space, and also give visitors to the site a sense of what is
available on the site without having to browse it extensively.
Dreamweaver lets you insert two kinds of Menu Bar : Insert > Spry > Spry Menu
Bar |
|
|
Step 5: A- the Design and Code of
... |
A- the Design and Code of
index-menu.php |
1- The Design of
index-menu.php |
|
2- The Code of
index-menu.php |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml"> <head> <meta
http-equiv="Content-Type" content="text/html; charset=utf-8"
/> <title>menu</title> <script
src="SpryAssets/SpryMenuBar.js"
type="text/javascript"></script> <link
href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet"
type="text/css"
/> </head>
<body>
<table
width="90%" border="0" cellspacing="1" cellpadding="1"
align="center"> <tr> <th scope="col"
height="10px"></th> </tr> <tr> <td
> <table width="100%" border="0" cellspacing="0"
cellpadding="0" style="background-color:
#8090AB;"> <tr> <th scope="col" align="center"
width="15%" style="background-color: #8090AB; font-size: xx-large;
color: #FFF; font-weight: bold; font-style: italic; font-family:
'Old English Text MT'">Menu</th> <th scope="col"
align="center" width="85%" height="80px" style="background-color:
#8090AB; font-family: 'Times New Roman', Times, serif; font-size:
xx-large; color: #FFF;" >Menu, Links
...</th> </tr> </table></td> </tr>
<tr> <td
height="10px"></td> </tr> <tr> <td><table
width="45%" border="0" align="center" cellpadding="0"
cellspacing="0"> <tr> <th scope="col"
align="center"><ul id="MenuBar1" class="MenuBarHorizontal"
a> <li><a class="MenuBarItemSubmenu"
href="#">Application
...</a> <ul> <li><a
href="index-combobox.php">Combo/Search</a></li> <li><a
href="index-display.php">Input</a></li> <li><a
href="index-combobox.php">Item
1.3</a></li> </ul> </li> <li><a
href="index-combobox.php">Item
2</a></li> <li><a class="MenuBarItemSubmenu"
href="#">Item 3</a> <ul> <li><a
class="MenuBarItemSubmenu" href="#">Item
3.1</a> <ul> <li><a
href="index-combobox.php">Item
3.1.1</a></li> <li><a
href="index-display.php">Item
3.1.2</a></li> </ul> </li> <li><a
href="index-combobox.php">Item
3.2</a></li> <li><a
href="index-display.php">Item
3.3</a></li> </ul> </li> <li><a
href="index-display.php">Item
4</a></li> </ul> <script
type="text/javascript"> var MenuBar1 = new
Spry.Widget.MenuBar("MenuBar1",
{imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
imgRight:"SpryAssets/SpryMenuBarRightHover.gif"}); </script></th> </tr> </table></td> </tr> <tr> <td
align="center" height="10px"
></td> </tr>
<tr> <td><table
width="90%" border="0" cellspacing="0" cellpadding="0"
align="center"> <tr> <th scope="col"
width="30"><table width="90%" border="0" cellspacing="0"
cellpadding="0" align="center"> <tr> <th
scope="col" align="left"> Go To
...<ul> <li ><a
href="index-combobox.php">Combo/Search
Application</a></li> <li ><a
href="index-display.php">Input
Application</a></li> </ul> </th> </tr> <tr> <td
height="8px"></td> </tr>
<tr> <td
height="8px" style="background-color:
#8090AB;"></td> </tr> <tr> <tr> <td
align="center" style="background-color: #8090AB;"><img
src="images/leila-pic1.jpg" width="133" height="170"
longdesc="images/leila-pic1.jpg"
/></td> </tr> <tr> <td height="8px"
style="background-color:
#8090AB;"></td> </tr> <tr> <td
align="center" style="background-color: #8090AB;"><img
src="images/leila-pic2.jpg" width="192" height="110"
longdesc="images/leila-pic2.jpg"
/></td> </tr>
<tr> <td
height="8px" style="background-color:
#8090AB;"></td> </tr> <tr> <tr> <td
height="10px"></td> </tr> </table></th> <th
scope="col" width="70%"><table width="100%" border="0"
cellspacing="0" cellpadding="0" style="background-color:
#8090AB;"> <tr> <th scope="col"
height="10px"></th> </tr> <tr> <td
align="center"><img src="images/I-1070_n.jpg" width="480"
height="177" longdesc="images/I-1070_n.jpg"
/></td> </tr> <tr> <td> </td> </tr> <tr> <td
align="center"><img src="images/J-moussa-pic.jpg" width="393"
height="174" longdesc="images/J-moussa-pic.jpg"
/></td> </tr> <tr> <td
height="10px"></td> </tr> </table></th> </tr> </table></td> </tr>
<tr> <td
height="10px"></td> </tr> <tr> <td
align="center"><a href="www.puresoftwarecode.com">@ pure
software
code</a></td> </tr> <tr> <td
height="10px" style="background-color:
#8090AB;"></td> </tr> </table>
</body> </html> | |
|
B- the Design and Code
of index-combobox.php |
1- The Design of
index-combobox.php |
|
|
2- The Code of
index-combobox.php |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml"> <head> <meta
http-equiv="Content-Type" content="text/html; charset=utf-8"
/> <title>Combo Box</title> <style
type="text/css"> #wrapper div table tbody tr td div table
tbody tr td { color: #CCC; } .ch { color:
#E2E2E2; } .fchk { color: #DBDBDB; } .chk
{ font-size:
24px; } </style> </head>
<body> <table
width="90%" border="0" cellspacing="1" cellpadding="1"
align="center"> <tr> <th width="89%" height="80px"
align="center" style="background-color: #8090AB; font-size: 24px;
color: #FFF; font-family: 'Times New Roman', Times, serif;
font-weight: bold; font-style: italic;" scope="col" >Database -
<span class="chk">Dynamic Select List (Combo), Text Field and
Button</span></th> </tr> <tr> <td
scope="col" align="right"a><a href="index-menu.php">Go to
Home</a> </td> </tr>
<tr> <td> <?php include("dbc.php"); ?> </td> </tr>
<tr> <td
height="10px"></td> </tr>
<tr> <td><table
width="60%" border="0" cellspacing="1" cellpadding="1"
style="background-color: #E2E2E2;" align="center"
> <tr><form method="post" action=""
id="searchform">
<th scope="col" align="right"
width="25%">Book:
<?php
// Form a
query to populate the combo-box $queryitem = "SELECT DISTINCT
Book FROM biblenewtable ORDER BY Book ASC ;";
// Successful
query? if($result = mysql_query($queryitem)) {
// If there
are results returned, prepare combo-box if($success =
mysql_num_rows($result) > 0) { // Start combo-box echo
"<select name='tBook'>"; echo "<option>-- Select Item
--</option>";
// For each BookTitle in the
results... while ($row = mysql_fetch_array($result)) // Add a
new option to the combo-box echo "<option
value='$row[Book]'>$row[Book]</option>";
// End the
combo-box echo "</select>"; } // No results found in
the database else { echo "No results found.";
} }
?>
</th>
<th
scope="col" align="right" width="30%">
Book
Title: <?php
// Form a query to populate the
combo-box $queryitem = "SELECT DISTINCT BookTitle FROM
biblenewtable ORDER BY BookTitle ASC ;";
// Successful
query? if($result = mysql_query($queryitem)) {
// If there
are results returned, prepare combo-box if($success =
mysql_num_rows($result) > 0) { // Start combo-box echo
"<select name='tbooktitle'>"; echo "<option>-- Select
Item --</option>";
// For each BookTitle in the
results... while ($row = mysql_fetch_array($result)) // Add a
new option to the combo-box echo "<option
value='$row[BookTitle]'>$row[BookTitle]</option>";
//
End the combo-box echo "</select>"; } // No results
found in the database else { echo "No results found.";
} }
?>
<th scope="col" align="center"
width="35%">Char: <input name="tinput" type="text"
id="tinput" value="" size="20" /> </th> <th
scope="col" align="left" width="10%"><input name="submit"
align="middle" type="submit" alt="Search Now!" border="0"
value="GO!"
/></th> </form> </tr> </table></td> </tr> <tr> <td
align="center">Example
-
Book: 41 Book
Title: Mark Char:j</td> </tr> <tr> <td> </td> </tr>
<tr> <td><table
width="90%" border="1" cellspacing="1" cellpadding="1"
align="center" style="background-color:
#DBEFDB;"> <tr> <th scope="col" align="left"
height="50px" > <?php
if
(!empty($_REQUEST['tinput'])) {
$tbooktitle =
mysql_real_escape_string($_REQUEST['tbooktitle']);
$tinput =
mysql_real_escape_string($_REQUEST['tinput']); $tBook =
mysql_real_escape_string($_REQUEST['tBook']);
//-query
the database table $sql = "SELECT * FROM biblenewtable WHERE Book
LIKE '%".$tBook."%' and BookTitle LIKE '%".$tbooktitle."%' and
TextData LIKE '%".$tinput."%' ORDER BY BookTitle ASC";
$r_query = mysql_query($sql);
//-run the query
against the mysql query function
$result=mysql_query($sql);
//-count results
$numrows=mysql_num_rows($r_query);
if($numrows>"0"){
echo "<p> "
.$numrows . " results found for " .$tBook. ", " .$tbooktitle. " and
" . $tinput . "</p>"; } else{ echo
"<p> 0 results found
for " .$tBook. ", " .$tbooktitle. " and " . $tinput . "</p>";
}
echo
"<p> the Values of:
Book Combobox = " .$tBook. ", BookTitle Combobox = " .$tbooktitle. "
and Input TextBox = " . $tinput . "</p>";
while ($row =
mysql_fetch_array($r_query)){
echo '<br /> Book: '
.$row['Book']; echo '<br /> Book Title: '
.$row['BookTitle']; echo '<br /> Chapter:
'.$row['Chapter']; echo '<br /> Verse: '.$row['Verse'];
echo '<br /> Text Data: '.$row['TextData']; echo
'<br />' ; }
} ?>
</th> </tr> </table></td> </tr>
<tr> <td
height="10px"></td> </tr> <tr> <td
height="10px"></td> </tr> <tr> <td
align="center"><a href="www.puresoftwarecode.com">@ pure
software
code</a></td> </tr> <tr> <td
height="10px" style="background-color:
#8090AB;"></td> </tr>
</table> </body> </html> | |
|
3- the Code, dbc.php
page File |
<?php $hostname_conmenu =
"localhost"; $database_conmenu =
"a-bible_en"; $username_conmenu = "root"; $password_conmenu =
""; $conmenu = mysql_pconnect($hostname_conmenu,
$username_conmenu, $password_conmenu) or
trigger_error(mysql_error(),E_USER_ERROR);
//SELECT `Id`,
`Book`, `BookTitle`, `Chapter`, `Verse`, `TextData` FROM
`biblenewtable` WHERE 1 mysql_select_db("a-bible_en") or
die(mysql_error()); ?> | |
|
|
C- the Design and Code
of index-display.php |
Note: this page used the
Database: Database Name = "a-data'", Table Name =
"itemsdata" |
|
|
1- The Design of
index-display.php |
|
|
2- The Code of
index-display.php |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml"> <head> <meta
http-equiv="Content-Type" content="text/html; charset=utf-8"
/> <title>Input & Display
...</title> <style type="text/css"> .chkk
{ font-family: "Times New Roman", Times, serif; font-size:
14px; font-weight:
bold; } </style> </head>
<body>
<?php include("dbd.php"); ?>
<form name="db-display" method="post"
action="db-display.php" onSubmit="return
validation()">
<table width="90%" border="0"
cellspacing="1" cellpadding="1"
align="center"> <tr> <th
width="10px"></th> </tr> <tr>
<td
width="89%" height="80px" align="center" style="background-color:
#8090AB; font-size: 24px; color: #FFF; font-family: 'Times New
Roman', Times, serif; font-weight: bold; font-style: italic;"
scope="col" >Input and Display, Database
... </td> </tr> <tr> <td
align="right"><a href="index-menu.php">Go to
Home</a> </td> </tr>
<tr> <td><table
width="80%" border="0" cellspacing="1" cellpadding="1"
align="center" style="background-color:
#E2E2E2;"> <tr> <th width="35%" height="30px"
align="right" class="chkk" scope="col"><label
for="firstname"><span class="chkk">First
name:</span> </label> </th> <th
scope="col" align="left" width="65%" ><input name="firstname"
type="text" id="firstname" value="" size="30"
/></th> </tr> <tr> <td width="35%"
height="30px" align="right" class="chkk"><label
for="lastname">Last
name: </label></td> <td align="left"
width="65%"><input name="lastname" type="text" id="lastname"
value="" size="30"
/></td> </tr> <tr> <td width="35%"
height="30px" align="right" class="chkk"><label
for="phone">Phone: </label></td> <td
align="left" width="65%"><input name="phone" type="text"
id="phone" value="" size="30"
/></td> </tr> <tr> <td width="35%"
height="30px" align="right" class="chkk"><label
for="country2">Country: </label></td> <td
align="left" width="65%"><select name="country"
id="country"> <option value="">Choose a
country</option> <option selected="selected"
value="US">United States</option> <option
value="CA">Canada</option> <option
value="AF">Afghanistan</option> <option
value="AL">Albania</option> <option
value="DZ">Algeria</option> <option
value="AS">American Samoa</option> <option
value="AD">Andorra</option> <option
value="AO">Angola</option> <option
value="AI">Anguilla</option> <option
value="AQ">Antarctica</option> <option
value="AG">Antigua and Barbuda</option> <option
value="AR">Argentina</option> <option
value="AM">Armenia</option> <option
value="AW">Aruba</option> <option
value="AU">Australia</option> <option
value="AT">Austria</option> <option
value="AZ">Azerbaijan</option> <option
value="BS">Bahamas</option> <option
value="BH">Bahrain</option> <option
value="BD">Bangladesh</option> <option
value="BB">Barbados</option> <option
value="BY">Belarus</option> <option
value="BE">Belgium</option> <option
value="BZ">Belize</option> <option
value="BJ">Benin</option> <option
value="BM">Bermuda</option> <option
value="BT">Bhutan</option> <option
value="BO">Bolivia</option> <option
value="BA">Bosnia and Herzegovina</option> <option
value="BW">Botswana</option> <option
value="BV">Bouvet Island</option> <option
value="BR">Brazil</option> <option
value="IO">British Indian Ocean
Territory</option> <option value="BN">Brunei
Darussalam</option> <option
value="BG">Bulgaria</option> <option
value="BF">Burkina Faso</option> <option
value="BI">Burundi</option> <option
value="KH">Cambodia</option> <option
value="CM">Cameroon</option> <option
value="CV">Cape Verde</option> <option
value="KY">Cayman Islands</option> <option
value="CF">Central African Republic</option> <option
value="TD">Chad</option> <option
value="CL">Chile</option> <option
value="CN">China</option> <option
value="CX">Christmas Island</option> <option
value="CC">Cocos (Keeling) Islands</option> <option
value="CO">Colombia</option> <option
value="KM">Comoros</option> <option
value="CG">Congo</option> <option
value="CD">Congo, the Democratic Republic of
the</option> <option value="CK">Cook
Islands</option> <option value="CR">Costa
Rica</option> <option value="CI">Cote
D'Ivoire</option> <option
value="HR">Croatia</option> <option
value="CU">Cuba</option> <option
value="CY">Cyprus</option> <option
value="CZ">Czech Republic</option> <option
value="DK">Denmark</option> <option
value="DJ">Djibouti</option> <option
value="DM">Dominica</option> <option
value="DO">Dominican Republic</option> <option
value="EC">Ecuador</option> <option
value="EG">Egypt</option> <option value="SV">El
Salvador</option> <option value="GQ">Equatorial
Guinea</option> <option
value="ER">Eritrea</option> <option
value="EE">Estonia</option> <option
value="ET">Ethiopia</option> <option
value="FK">Falkland Islands
(Malvinas)</option> <option value="FO">Faroe
Islands</option> <option
value="FJ">Fiji</option> <option
value="FI">Finland</option> <option
value="FR">France</option> <option
value="GF">French Guiana</option> <option
value="PF">French Polynesia</option> <option
value="TF">French Southern
Territories</option> <option
value="GA">Gabon</option> <option
value="GM">Gambia</option> <option
value="GE">Georgia</option> <option
value="DE">Germany</option> <option
value="GH">Ghana</option> <option
value="GI">Gibraltar</option> <option
value="GR">Greece</option> <option
value="GL">Greenland</option> <option
value="GD">Grenada</option> <option
value="GP">Guadeloupe</option> <option
value="GU">Guam</option> <option
value="GT">Guatemala</option> <option
value="GN">Guinea</option> <option
value="GW">Guinea-Bissau</option> <option
value="GY">Guyana</option> <option
value="HT">Haiti</option> <option value="HM">Heard
Island and Mcdonald Islands</option> <option
value="VA">Holy See (Vatican City
State)</option> <option
value="HN">Honduras</option> <option
value="HK">Hong Kong</option> <option
value="HU">Hungary</option> <option
value="IS">Iceland</option> <option
value="IN">India</option> <option
value="ID">Indonesia</option> <option
value="IR">Iran, Islamic Republic of</option> <option
value="IQ">Iraq</option> <option
value="IE">Ireland</option> <option
value="IL">Israel</option> <option
value="IT">Italy</option> <option
value="JM">Jamaica</option> <option
value="JP">Japan</option> <option
value="JO">Jordan</option> <option
value="KZ">Kazakhstan</option> <option
value="KE">Kenya</option> <option
value="KI">Kiribati</option> <option
value="KP">Korea, Democratic People's Republic
of</option> <option value="KR">Korea, Republic
of</option> <option
value="KW">Kuwait</option> <option
value="KG">Kyrgyzstan</option> <option
value="LA">Lao People's Democratic
Republic</option> <option
value="LV">Latvia</option> <option
value="LB">Lebanon</option> <option
value="LS">Lesotho</option> <option
value="LR">Liberia</option> <option
value="LY">Libyan Arab Jamahiriya</option> <option
value="LI">Liechtenstein</option> <option
value="LT">Lithuania</option> <option
value="LU">Luxembourg</option> <option
value="MO">Macao</option> <option
value="MK">Macedonia, the Former Yugoslav Republic
of</option> <option
value="MG">Madagascar</option> <option
value="MW">Malawi</option> <option
value="MY">Malaysia</option> <option
value="MV">Maldives</option> <option
value="ML">Mali</option> <option
value="MT">Malta</option> <option
value="MH">Marshall Islands</option> <option
value="MQ">Martinique</option> <option
value="MR">Mauritania</option> <option
value="MU">Mauritius</option> <option
value="YT">Mayotte</option> <option
value="MX">Mexico</option> <option
value="FM">Micronesia, Federated States
of</option> <option value="MD">Moldova, Republic
of</option> <option
value="MC">Monaco</option> <option
value="MN">Mongolia</option> <option
value="MS">Montserrat</option> <option
value="MA">Morocco</option> <option
value="MZ">Mozambique</option> <option
value="MM">Myanmar</option> <option
value="NA">Namibia</option> <option
value="NR">Nauru</option> <option
value="NP">Nepal</option> <option
value="NL">Netherlands</option> <option
value="AN">Netherlands Antilles</option> <option
value="NC">New Caledonia</option> <option
value="NZ">New Zealand</option> <option
value="NI">Nicaragua</option> <option
value="NE">Niger</option> <option
value="NG">Nigeria</option> <option
value="NU">Niue</option> <option
value="NF">Norfolk Island</option> <option
value="MP">Northern Mariana Islands</option> <option
value="NO">Norway</option> <option
value="OM">Oman</option> <option
value="PK">Pakistan</option> <option
value="PW">Palau</option> <option
value="PS">Palestinian Territory,
Occupied</option> <option
value="PA">Panama</option> <option
value="PG">Papua New Guinea</option> <option
value="PY">Paraguay</option> <option
value="PE">Peru</option> <option
value="PH">Philippines</option> <option
value="PN">Pitcairn</option> <option
value="PL">Poland</option> <option
value="PT">Portugal</option> <option
value="PR">Puerto Rico</option> <option
value="QA">Qatar</option> <option
value="RE">Reunion</option> <option
value="RO">Romania</option> <option
value="RU">Russian Federation</option> <option
value="RW">Rwanda</option> <option
value="SH">Saint Helena</option> <option
value="KN">Saint Kitts and Nevis</option> <option
value="LC">Saint Lucia</option> <option
value="PM">Saint Pierre and Miquelon</option> <option
value="VC">Saint Vincent and the
Grenadines</option> <option
value="WS">Samoa</option> <option value="SM">San
Marino</option> <option value="ST">Sao Tome and
Principe</option> <option value="SA">Saudi
Arabia</option> <option
value="SN">Senegal</option> <option
value="CS">Serbia and Montenegro</option> <option
value="SC">Seychelles</option> <option
value="SL">Sierra Leone</option> <option
value="SG">Singapore</option> <option
value="SK">Slovakia</option> <option
value="SI">Slovenia</option> <option
value="SB">Solomon Islands</option> <option
value="SO">Somalia</option> <option
value="ZA">South Africa</option> <option
value="GS">South Georgia and the South Sandwich
Islands</option> <option
value="ES">Spain</option> <option value="LK">Sri
Lanka</option> <option
value="SD">Sudan</option> <option
value="SR">Suriname</option> <option
value="SJ">Svalbard and Jan Mayen</option> <option
value="SZ">Swaziland</option> <option
value="SE">Sweden</option> <option
value="CH">Switzerland</option> <option
value="SY">Syrian Arab Republic</option> <option
value="TW">Taiwan, Province of China</option> <option
value="TJ">Tajikistan</option> <option
value="TZ">Tanzania, United Republic
of</option> <option
value="TH">Thailand</option> <option
value="TL">Timor-Leste</option> <option
value="TG">Togo</option> <option
value="TK">Tokelau</option> <option
value="TO">Tonga</option> <option
value="TT">Trinidad and Tobago</option> <option
value="TN">Tunisia</option> <option
value="TR">Turkey</option> <option
value="TM">Turkmenistan</option> <option
value="TC">Turks and Caicos Islands</option> <option
value="TV">Tuvalu</option> <option
value="UG">Uganda</option> <option
value="UA">Ukraine</option> <option
value="AE">United Arab Emirates</option> <option
value="GB">United Kingdom</option> <option
value="UM">United States Minor Outlying
Islands</option> <option
value="UY">Uruguay</option> <option
value="UZ">Uzbekistan</option> <option
value="VU">Vanuatu</option> <option
value="VE">Venezuela</option> <option
value="VN">Viet Nam</option> <option
value="VG">Virgin Islands, British</option> <option
value="VI">Virgin Islands, U.s.</option> <option
value="WF">Wallis and Futuna</option> <option
value="EH">Western Sahara</option> <option
value="YE">Yemen</option> <option
value="ZM">Zambia</option> <option
value="ZW">Zimbabwe</option> </select></td> </tr> <tr> <td
width="35%" height="30px" align="right" class="chkk"><label
id="StateLabel" for="State2">State /
Province: </label></td> <td align="left"
width="65%"><select name="state" id="state"> <option
value="No">No state</option> <option
value="AL">Alabama</option> <option
value="AK">Alaska</option> <option
value="AS">American Samoa</option> <option
value="AZ">Arizona</option> <option
value="AR">Arkansas</option> <option
value="AE">Armed Forces Africa</option> <option
value="AA">Armed Forces Americas (except
Canada)</option> <option value="AE">Armed Forces
Canada</option> <option value="AE">Armed Forces
Europe</option> <option value="AE">Armed Forces
Middle East</option> <option value="AP">Armed Forces
Pacific</option> <option selected="selected"
value="CA">California</option> <option
value="CO">Colorado</option> <option
value="CT">Connecticut</option> <option
value="DE">Delaware</option> <option
value="DC">District of Columbia</option> <option
value="FM">Federated States of
Micronesia</option> <option
value="FL">Florida</option> <option
value="GA">Georgia</option> <option
value="GU">Guam</option> <option
value="HI">Hawaii</option> <option
value="ID">Idaho</option> <option
value="IL">Illinois</option> <option
value="IN">Indiana</option> <option
value="IA">Iowa</option> <option
value="KS">Kansas</option> <option
value="KY">Kentucky</option> <option
value="LA">Louisiana</option> <option
value="ME">Maine</option> <option
value="MH">Marshall Islands</option> <option
value="MD">Maryland</option> <option
value="MA">Massachusetts</option> <option
value="MI">Michigan</option> <option
value="MN">Minnesota</option> <option
value="MS">Mississippi</option> <option
value="MO">Missouri</option> <option
value="MT">Montana</option> <option
value="NE">Nebraska</option> <option
value="NV">Nevada</option> <option value="NH">New
Hampshire</option> <option value="NJ">New
Jersey</option> <option value="NM">New
Mexico</option> <option value="NY">New
York</option> <option value="NC">North
Carolina</option> <option value="ND">North
Dakota</option> <option value="MP">Northern Mariana
Islands</option> <option
value="OH">Ohio</option> <option
value="OK">Oklahoma</option> <option
value="OR">Oregon</option> <option
value="PW">Palau</option> <option
value="PA">Pennsylvania</option> <option
value="PR">Puerto Rico</option> <option
value="RI">Rhode Island</option> <option
value="SC">South Carolina</option> <option
value="SD">South Dakota</option> <option
value="TN">Tennessee</option> <option
value="TX">Texas</option> <option
value="UT">Utah</option> <option
value="VT">Vermont</option> <option
value="VI">Virgin Islands</option> <option
value="VA">Virginia</option> <option
value="WA">Washington</option> <option
value="WV">West Virginia</option> <option
value="WI">Wisconsin</option> <option
value="WY">Wyoming</option> </select></td> </tr> <tr> <td
width="35%" height="30px" align="right" class="chkk"><label
for="Address">Address: </label></td> <td
align="left" width="65%"><input name="Address" type="text"
id="Address" value="" size="30"
/></td> </tr> <tr> <td width="35%"
height="30px" align="right" class="chkk"><label
for="Address2">Address
2: </label></td> <td align="left"
width="65%"><input type="text" name="Address2" id="Address2"
value="" size="30"
/></td> </tr> <tr> <td width="35%"
height="30px" align="right" class="chkk"><label
for="city">City: </label></td> <td
align="left" width="65%"><input name="city" type="text"
id="city" value="" size="30"
/></td> </tr> <tr> <td width="35%"
height="30px" align="right" class="chkk"><label
for="postcode">Postal
code: </label></td> <td align="left"
width="65%"><input name="postcode" type="text" id="postcode"
value="" size="20"
/></td> </tr> </table></td> </tr> <tr> <td
height="10px"></td> </tr> <tr> <td
align="center" style="background-color: #E2E2E2;"> <p
align="center">Press the <strong>Submit</strong>
button only ONCE to send securely.<br /> <input
name="submit" type="submit" tabindex="38" id="submit"
onclick="this.form.submit();" value="Submit the Input ..." />
</p>
</td> </tr> <tr> <td
height="10px"></td> </tr> <tr> <td><table
width="85%" border="0" cellspacing="3" cellpadding="3"
align="center" style="background-color:
#DBEFDB;"> <tr> <th scope="col"
align="left"> <?php
$select=mysql_query("select ID,
firstname, lastname, phone FROM itemsdata order by ID DESC limit 0,
2 ");
while($row=mysql_fetch_array($select)) { echo
"<div id='sty'>"; echo "<img
src='images/generic_001.png'"."' width='50px' height='60px'
align='left' />"; //The time is now <?php echo
date('H:i:s'); echo "<div
id='ID'> ID
= ".$row['ID']."</div>" ; echo "<div
id='firstname'> First Name
= ".$row['firstname']."</div>" ; echo "<div
id='lastname'> Last Name
= ".$row['lastname']."</div>"; echo "<div
id='phone'> Phone
= ".$row['phone']."</div>"; echo
"</div><br
/>"; } ?> </th> </tr>
</table></td> </tr>
<tr> <td
height="10px"></td> </tr> <tr> <td
align="center"><a href="www.puresoftwarecode.com">@ pure
software
code</a></td> </tr> <tr> <td
height="10px" style="background-color:
#8090AB;"></td> </tr> </table> </form> </body> </html> | |
|
3- the Code, dbd.php
page File |
<?php $hostname_conmenu =
"localhost"; $database_conmenu =
"a-bible_en"; $username_conmenu = "root"; $password_conmenu =
""; $conmenu = mysql_pconnect($hostname_conmenu,
$username_conmenu, $password_conmenu) or
trigger_error(mysql_error(),E_USER_ERROR);
//SELECT `Id`,
`Book`, `BookTitle`, `Chapter`, `Verse`, `TextData` FROM
`biblenewtable` WHERE 1 mysql_select_db("a-bible_en") or
die(mysql_error()); ?> | |
|
4- the Code,
db-display.php page File |
<?php //database: a-data --- table:
forms
include("dbd.php"); ?>
<?php
if(isset($_POST['submit'])) {
$firstname=$_POST['firstname']; $lastname=$_POST['lastname']; $phone=$_POST['phone']; $country=$_POST['country']; $state=$_POST['state']; $Address=$_POST['address']; $Address2=$_POST['address2']; $city=$_POST['city'];
$postcode=$_POST['postcode'];
$insert=mysql_query("insert into
itemsdata(firstname,lastname,phone,country,state,address,address2,city,postcode)values('$firstname','$lastname','$phone','$country','$state','$Address','$Address2','$city','$postcode')")or
die(mysql_error());
header("Location:index-display.php"); } ?> | |
|
Other data
... |
1-
Folder images
stores: |
|
|
2- Folder SpryAssets
created by system with Spry Menu Bar and stores: |
|
|
|
|
|
in Dreamweaver, select or open (php) files, Go
to File -> Preview in Browser -> IExplore or chrome, to Show
and display the Search Operations... |
A- index-menu.php
|
|
|
B- index-combobox.php
in Dreamweaver, select or open (php) files,
Go to File -> Preview in Browser -> IExplore or chrome, to
Show and display the Search Operations... |
| |
|
after Click GO! |
|
|
C- index-display.php
n Dreamweaver, select or open (php) files, Go to
File -> Preview in Browser -> IExplore or chrome, to Show and
display the Search Operations... |
|
|
after Submit... |
|
|
|
|