I'm trying to design a web service for women to get information on Biblical Women.
Here's the code for page 1:
<html>
<head>
<title>Extraordinary Women of the Bible</title>
<style>
h1 {color:navy;
font-family:times-roman;
text-align:center;
font-weight:bold;
font-style:italic;
}
body {font-family:times-roman;
font-size:14pt;
color:navy;
background-image:url(bluerosebg.jpg);
}
span {font-style:italic;
font-weight:bold;
}
</style>
</head>
<body>
<h1>Extraordinary Women of the Bible</h1>
<p>This Bible study tool will help you get information about
<span>Extraordinary Women of the Bible</span>. Discover the
meaning of your favorite biblical sister's name and the Scripture
references where her deeds are recorded in God's timeless Word.
The phonetic spelling of each woman's name is included for easy
pronunciation.</p>
<p>Choose a name from the list below, enter it into the Search Box,
and Submit Your Request.</p>
<br/><br/>
<ul>
<li>Esther</li>
<li>Hannah</li>
<li>Mary</li>
<li>Naomi</li>
<li>Rahab</li>
<li>Ruth</li>
<li>Sarah</li>
</ul>
<form action="http://student-iat.ubalt.edu/dynamic/jdixon/homework/Project/mydbase44.php" method="post .results">
<input type="text" name="name" value="Enter Name Here"
size="30" maxlength="30"><br/><br/>
<button name="senddata" type="submit">Submit Request</button>
</form>
</body>
</html>
The code for page 2 is:
<?php
require_once("DBConnector.class.php");
$server = "student-iat.ubalt.edu";
$username = "jdixon";
$password = "bla";
$database = "jdixon";
$bibleDB = new DBConnector();
$bibleDB->ConnectDBMS($server, $username, $password, $database);
$htmlOpen = "
<html>
<head>
<title>Extraordinary Women of the Bible</title>
<style>
h1 {font-family:vivaldi,mistral,georgia,times-roman;
font-style:italic;
font-size:70pt;
color:navy;
text-align:center;
}
body {color:navy;
background-image:url(bluerosebg.jpg);
font-family:times-roman;
font-size: 28pt;
.results {font-family:times-roman;
font-size:16pt;
height:800px;
width:700px;
left:150px;
top:150px;
position:absolute;
text-align:center;
</style>
</head>
<body>
";
$htmlClose = "\n</body></html>";
$_REQUEST['name'] = "Hannah";
$name = $_REQUEST['name'];
$hernameSQL = "
SELECT
name,
pronunciation
FROM
woman
WHERE
woman.name = '$name'";
$referencesSQL = "
SELECT
url
FROM
woman, reference
WHERE
woman.name = '$name'
AND reference.woman_id = woman.id";
$bibleDB->sendSQL($hernameSQL);
print($htmlOpen);
$woman= $bibleDB->getResultArrayFirstRow();
$name = $woman['name'];
$pronunciation = $woman['pronunciation'];
$simple = <<<SIMPLE_HTML
<h1>{$name}</h1>
<img src="{$pronunciation}"><br/>
SIMPLE_HTML;
print($simple);
$bibleDB->sendSQL($referencesSQL);
$rows = $bibleDB->getResultRowCount();
print("<d1>\n");
for ($i = 0; $i < $rows ; $i++) {
$ref = $bibleDB->getResultArrayRow($i);
$url = $ref['url'];
$simple = <<<SIMPLE_HTML
<dt><a href="{url}">{$url}</a></dt>
SIMPLE_HTML;
print($simple);
}
print("</d1>\n");
print($htmlClose);
?>
I don't understand how to have the woman's name entered into the text box, then sent to get the results.
Please HELP!
Thanks for anything you can do. This is my first time attempting this type of project.