Hi,
I created a Search codes to retrieve member info from the database. But there are two problems with it.
1) the result of the search displayed on the same form. I will like to have codes that can be used to display the result on a separate window, and not on the same form.
2) the search result stays on the form even when you do another search. I will like a code that will display the result and empty the content for another search.
The current codes is below:
<?php
extract($_POST);
if (empty($Search)) {
} else {
$dbh = mysql_connect("localhost", "#######", "######") or die(mysql_error());
mysql_select_db("######") or die(mysql_error());
$query = "SELECT title, Speaker, Venue, City, Country, Start_date, End_date, Time, AMPM, Church, Pastor, Contact_person, Address, Telephone, comments FROM Crusade WHERE Title = '$Title' OR Speaker='$Speaker' OR City='$City' OR Start_date='$Start_date' OR Church='$Church' OR Pastor='$Pastor'";
$result = mysql_query($query) or die(mysql_error());
if (mysql_num_rows($result) > 0) {
while ($r = mysql_fetch_array($result)) {
extract($r);
?>
These are the results <BR>
<?=$Tile?>, <?=$Speaker?>, <?=$Venue?>, <?=$City?>, <?=$Country?>, <?=$Start_date?>, <?=$End_date?>, <?=$Time?>, <?=$AMPM?>, <?=$Church?>, <?=$Pastor?>, <?=$Contact_person?>, <?=$Address?>, <?=$Telephone?>, <?=$comments?>
<br><br>
<?php
}
mysql_close($dbh);
} else {
?>
Sorry, Program not found. <?php
}
}
?>
I will appreciate if can add to this code, or create a completely new one.
In addition, I also need a codes for Member Login; A) For member to be able to supply their Username and passord and login 😎 and to be able to create a new Username and password if they forget the first one created.
Thanks in advance