Adam
asked on
How can I keep my search parameters after clicking on a result from a list of search results
My search values don't carry on, after a row has been selected from the list of results. So how can I keep these seacrh parameters in place, after rows/reults from the list have been selected?
I have previously managed to get this to work for a previous site, but for this site, using the same code (I think), it seems not to work. I really don't understand it. The code I'm using to try to retain the parameters are:
RESULTS PAGE 0 (clicking on a row links to Results page 1):
<a href="NewMemberTeacherProf ile0.php?l anguage=<? php echo $_GET['language'] ?>&prefecture=<?php echo $_GET['prefecture'] ?>&recordID=<?php echo $row_m['autonumber']; ?>" class="style45"><font size="1" face="Arial, Helvetica, sans-serif"><?php echo $row_m['firstname']; ?></font></a>
RESULTS PAGE 1
<a href="NewMemberTeacherProf ile0.php?l anguage=<? php echo $_GET['language'] ?>&prefecture=<?php echo $_GET['prefecture'] ?>&recordID=<?php echo $row_m['autonumber']; ?>" class="style45"><font size="1" face="Arial, Helvetica, sans-serif"><?php echo $row_m['firstname']; ?></font></a>
I have previously managed to get this to work for a previous site, but for this site, using the same code (I think), it seems not to work. I really don't understand it. The code I'm using to try to retain the parameters are:
RESULTS PAGE 0 (clicking on a row links to Results page 1):
<a href="NewMemberTeacherProf
RESULTS PAGE 1
<a href="NewMemberTeacherProf
I think you can create a new table (search), with some field:
id : search id
query : ur sql query
result : ur total rows of ur search
when user do a search, first, you check it had in database. If yes, don't insert the info into table search; else insert the search query into ur table.
Then at the link, you have some thing like : index.php?do=search&search id=123&pag e=2
In your code, check you have variable searchid from $_GET or not. If yes, get the search query from you search table and do a search like SELECT * FROM table WHERE field LIKE '%ur seach text%' LIMIT 20, 20
else check the search text from $_POST then do a search.
Sorry 4 my bad english.
Goodluck.
Bonmat86.
id : search id
query : ur sql query
result : ur total rows of ur search
when user do a search, first, you check it had in database. If yes, don't insert the info into table search; else insert the search query into ur table.
Then at the link, you have some thing like : index.php?do=search&search
In your code, check you have variable searchid from $_GET or not. If yes, get the search query from you search table and do a search like SELECT * FROM table WHERE field LIKE '%ur seach text%' LIMIT 20, 20
else check the search text from $_POST then do a search.
Sorry 4 my bad english.
Goodluck.
Bonmat86.
ASKER
Hi - Sorry for the poor explanation. Basically, for example, there is a search box on the homepage of the website
www.orangutanjapan.com
It's in Japanese, and the search parameteres are currently set to 'all / show all' for both boxes, but if you, for example, were to select the 3rd option (which is 'South Korean') on the upper drop down menu and press the search button below the second drop down menu you would be presented with a list of teachers from South Korea.
This is good, as from the search box I've selected a search on all teachers from South Korea. However, if we click on one of these results (teachers), the details of that teacher are displayed - which is what is desired, but the list refreshes and the parameter 'South Korea' is lost and instead all teachers are shown.
I have actually got this working before - using the code I've listed above, but here, I can't seem to get it working....
Many thanks
Adam
www.orangutanjapan.com
It's in Japanese, and the search parameteres are currently set to 'all / show all' for both boxes, but if you, for example, were to select the 3rd option (which is 'South Korean') on the upper drop down menu and press the search button below the second drop down menu you would be presented with a list of teachers from South Korea.
This is good, as from the search box I've selected a search on all teachers from South Korea. However, if we click on one of these results (teachers), the details of that teacher are displayed - which is what is desired, but the list refreshes and the parameter 'South Korea' is lost and instead all teachers are shown.
I have actually got this working before - using the code I've listed above, but here, I can't seem to get it working....
Many thanks
Adam
Sorry for the delay, had a phonecall...
<?php
$search=isset($_REQUEST['s earch'])?$ _REQUEST[' search']:" %"; //Default to "Everything" - We'll limit the result set size so this won't be an issue
$query="
SELECT id,
field1,
field2
FROM table
WHERE field LIKE '%" . mysql_escape_string($searc h . "%'
LIMIT 20, 20";
//Store search for later use:
setcookie("search", $search);
$result = mysql_query($query);
//Display output:
print "<TABLE>";
while ($row = mysql_fetch_assoc($result) ) {
print "<TR><TD><a href="details.php?id={$row ['id']}">{ $row['id'] }</A></TD> <TD>{$row[ 'field1']} </TD><TD>{ $row['fiel d2']}</TD> </TR>";
}
print "</TABLE>";
?>
What this will mean is that anyone going BACK to the search page will see their old search results (You can store page number the same way), and there is a unique ID on each row to link from. Is this what you are after?
<?php
$search=isset($_REQUEST['s
$query="
SELECT id,
field1,
field2
FROM table
WHERE field LIKE '%" . mysql_escape_string($searc
LIMIT 20, 20";
//Store search for later use:
setcookie("search", $search);
$result = mysql_query($query);
//Display output:
print "<TABLE>";
while ($row = mysql_fetch_assoc($result)
print "<TR><TD><a href="details.php?id={$row
}
print "</TABLE>";
?>
What this will mean is that anyone going BACK to the search page will see their old search results (You can store page number the same way), and there is a unique ID on each row to link from. Is this what you are after?
Sorry, just read the detailed explanation. I suggest a similar approach but just have something to preserve the drop-down box...
<?php
$area = isset($_REQUEST['area'])?$ _REQUEST[' area']:""; //Default to no area, but retrieve from previous page if possible.
?>
<SELECT name="whatever">
<OPTION VALUE="northkorea" <?if($area=="northkorea"){ print " SELECTED";}?>>North Korea</OPTION>
<OPTION VALUE="southkorea" <?if($area=="southkorea"){ print " SELECTED";}?>>South Korea</OPTION>
</SELECT>
which will preserve the contents of the drop-down. There are more elegant ways to do this - eg putting all the locations/vakues in an array and looping through them, printing <OPTION> statements, which will save redundancy or even better, pulling the list of locaitons from the database.
Most likely the issue here is the way SELECT boxes work ie needing the SELECTED instead of just setting a value.
There are a number of considerations: 1) The variable must be preserved - either it has to be added to evry link to immitate a GET, or it must be submitted in every form to cover POST or you can set it as a cookie - which will be great unless someone has 2 copies of the site open at once...
<?php
$area = isset($_REQUEST['area'])?$
?>
<SELECT name="whatever">
<OPTION VALUE="northkorea" <?if($area=="northkorea"){
<OPTION VALUE="southkorea" <?if($area=="southkorea"){
</SELECT>
which will preserve the contents of the drop-down. There are more elegant ways to do this - eg putting all the locations/vakues in an array and looping through them, printing <OPTION> statements, which will save redundancy or even better, pulling the list of locaitons from the database.
Most likely the issue here is the way SELECT boxes work ie needing the SELECTED instead of just setting a value.
There are a number of considerations: 1) The variable must be preserved - either it has to be added to evry link to immitate a GET, or it must be submitted in every form to cover POST or you can set it as a cookie - which will be great unless someone has 2 copies of the site open at once...
I would suggest that the info that needs to be carried over from page to page is kept in $_SESSION rather than in $_COOKIE
Pro SESSION: Cookies should be kept as small as possible, eg for carrying some info like session ID or language. Larger chunks of data (eg previous search, or previous search results, or even search history) would better fit in session data. This also limits the information that will remain on the user's station and will be more resistant to direct data manipulation in the cookie.
Pro COOKIE: you can access its content directly with $_REQUEST which browses one after the other and in that order $_GET, $_POST and $_COOKIE. Otherwise, if you put your data in $_SESSION, you would have first to look at $_REQUEST then $_SESSION.
Personally I prefer using SESSION which give me a better security control.
Pro SESSION: Cookies should be kept as small as possible, eg for carrying some info like session ID or language. Larger chunks of data (eg previous search, or previous search results, or even search history) would better fit in session data. This also limits the information that will remain on the user's station and will be more resistant to direct data manipulation in the cookie.
Pro COOKIE: you can access its content directly with $_REQUEST which browses one after the other and in that order $_GET, $_POST and $_COOKIE. Otherwise, if you put your data in $_SESSION, you would have first to look at $_REQUEST then $_SESSION.
Personally I prefer using SESSION which give me a better security control.
ASKER
thanks for the feedback so far everyone.
Basic Life - the advice you gave me above, does this code go in the search page? In particular, where would I put this line of code you gave me:
<?php
$area = isset($_REQUEST['area'])?$ _REQUEST[' area']:""; //Default to no area, but retrieve from previous page if possible.
?>
Thanks
Basic Life - the advice you gave me above, does this code go in the search page? In particular, where would I put this line of code you gave me:
<?php
$area = isset($_REQUEST['area'])?$
?>
Thanks
The line listed would go anywhere before the search form. All it is doing is checking whether or not a search has already been made - if so, set $area to the are searched, otherwise set $area to ""
This bit:
<SELECT name="whatever">
<OPTION VALUE="northkorea" <?if($area=="northkorea"){ print " SELECTED";}?>>North Korea</OPTION>
<OPTION VALUE="southkorea" <?if($area=="southkorea"){ print " SELECTED";}?>>South Korea</OPTION>
</SELECT>
is how you can display the drop-down list (on the search page) which will automatically select the previous area if it matches.
This bit:
<SELECT name="whatever">
<OPTION VALUE="northkorea" <?if($area=="northkorea"){
<OPTION VALUE="southkorea" <?if($area=="southkorea"){
</SELECT>
is how you can display the drop-down list (on the search page) which will automatically select the previous area if it matches.
ASKER
Hi basiclife,
I've tried what you suggested adding the following where my previous drop down list was (see below) but I still am not getting the parameters to preserve.
I'm pretty confused because I've managed this before on another site - using just the following in the results screen:
<a href="NewMemberTeacherProf ile0.php?l anguage=<? php echo $_GET['language'] ?>&prefecture=<?php echo $_GET['prefecture'] ?>&recordID=<?php echo $row_m['autonumber']; ?>" class="style45"><font size="1" face="Arial, Helvetica, sans-serif"><?php echo $row_m['firstname']; ?></font></a>
Anyway - your help is very much appreciated. Thanks - I'll keep at it!
<select name="language" class="style28" id="language">
<option value="" selected>hýžg </option>
<option value="English" <?if($area=="English"){pri nt " SELECTED";}?>>ñž</OPTION>
<option value="korean" <?if($area=="korean"){prin t " SELECTED";}?>>Óýž</OPTION>
<option value="Chinese" <?if($area=="Chinese"){pri nt " SELECTED";}?>>-ýž</OPTION>
<option value="Vietnamese" <?if($area=="Vietnamese"){ print " SELECTED";}?>>ÙÈÊàž</OPTIO N>
<option value="Azerbaijani" <?if($area=="Azerbaijani") {print " SELECTED";}?>>¢¼ëФ¸ãóž</O PTION>
<option value="Arabic" <?if($area=="Arabic"){prin t " SELECTED";}?>>¢éÓ¢ž</OPTIO N>
<option value="Italian" <?if($area=="Italian"){pri nt " SELECTED";}?>>¤¿ê¢ž</OPTIO N>
<option value="Indonesia" <?if($area=="Indonesia"){p rint " SELECTED";}?>>¤óÉÍ·¢ž</OPT ION>
<option value="Holland" <?if($area=="Holland"){pri nt " SELECTED";}?>>ªéóÀž</OPTIO N>
<option value="Estonia" <?if($area=="Estonia"){pri nt " SELECTED";}?>>¨¹ÈË¢ž</OPTI ON>
<option value="Cambodia" <?if($area=="Cambodia"){pr int " SELECTED";}?>>«óܸ¢ž</OPTI ON>
<option value="Spanish" <?if($area=="Spanish"){pri nt " SELECTED";}?>>¹Ú¤óž</OPTIO N>
<option value="Zulu" <?if($area=="Zulu"){print " SELECTED";}?>>ºüëüž</OPTIO N>
<option value="Thai" <?if($area=="Thai"){print " SELECTED";}?>>¿¤ž</OPTION>
<option value="Tagalog" <?if($area=="Tagalog"){pri nt " SELECTED";}?>>¿¬í°ž</OPTIO N>
<option value="Tamil" <?if($area=="Tamil"){print " SELECTED";}?>>¿ßëž</OPTION >
<option value="Danish" <?if($area=="Danish"){prin t " SELECTED";}?>>ÇóÞü¯ž</OPTI ON>
<option value="Turkish" <?if($area=="Turkish"){pri nt " SELECTED";}?>>È볞</OPTION >
<option value="German" <?if($area=="German"){prin t " SELECTED";}?>>ɤĞ</OPTION >
<option value="Nepalese" <?if($area=="Nepalese"){pr int " SELECTED";}?>>ÍÐüëž</OPTIO N>
<option value="Hindu" <?if($area=="Hindu"){print " SELECTED";}?>>Òóºüž</OPTIO N>
<option value="French" <?if($area=="French"){prin t " SELECTED";}?>>Õéó¹ž</OPTIO N>
<option value="Bulgarian" <?if($area=="Bulgarian"){p rint " SELECTED";}?>>Öë¬ê¢ž</OPTI ON>
<option value="Bengali" <?if($area=="Bengali"){pri nt " SELECTED";}?>>Ùó¬ëž</OPTIO N>
<option value="Portuguese" <?if($area=="Portuguese"){ print " SELECTED";}?>>ÝëȬëž</OPTI ON>
<option value="Polish" <?if($area=="Polish"){prin t " SELECTED";}?>>ÝüéóÉž</OPTI ON>
<option value="Myanmar" <?if($area=="Myanmar"){pri nt " SELECTED";}?>>ßãóÞüž</OPTI ON>
<option value="Romanian" <?if($area=="Romanian"){pr int " SELECTED";}?>>ëüÞË¢ž</OPTI ON>
<option value="Russian" <?if($area=="Russian"){pri nt " SELECTED";}?>>í·¢ž</OPTION >
</select>
I've tried what you suggested adding the following where my previous drop down list was (see below) but I still am not getting the parameters to preserve.
I'm pretty confused because I've managed this before on another site - using just the following in the results screen:
<a href="NewMemberTeacherProf
Anyway - your help is very much appreciated. Thanks - I'll keep at it!
<select name="language" class="style28" id="language">
<option value="" selected>hýžg </option>
<option value="English" <?if($area=="English"){pri
<option value="korean" <?if($area=="korean"){prin
<option value="Chinese" <?if($area=="Chinese"){pri
<option value="Vietnamese" <?if($area=="Vietnamese"){
<option value="Azerbaijani" <?if($area=="Azerbaijani")
<option value="Arabic" <?if($area=="Arabic"){prin
<option value="Italian" <?if($area=="Italian"){pri
<option value="Indonesia" <?if($area=="Indonesia"){p
<option value="Holland" <?if($area=="Holland"){pri
<option value="Estonia" <?if($area=="Estonia"){pri
<option value="Cambodia" <?if($area=="Cambodia"){pr
<option value="Spanish" <?if($area=="Spanish"){pri
<option value="Zulu" <?if($area=="Zulu"){print " SELECTED";}?>>ºüëüž</OPTIO
<option value="Thai" <?if($area=="Thai"){print " SELECTED";}?>>¿¤ž</OPTION>
<option value="Tagalog" <?if($area=="Tagalog"){pri
<option value="Tamil" <?if($area=="Tamil"){print
<option value="Danish" <?if($area=="Danish"){prin
<option value="Turkish" <?if($area=="Turkish"){pri
<option value="German" <?if($area=="German"){prin
<option value="Nepalese" <?if($area=="Nepalese"){pr
<option value="Hindu" <?if($area=="Hindu"){print
<option value="French" <?if($area=="French"){prin
<option value="Bulgarian" <?if($area=="Bulgarian"){p
<option value="Bengali" <?if($area=="Bengali"){pri
<option value="Portuguese" <?if($area=="Portuguese"){
<option value="Polish" <?if($area=="Polish"){prin
<option value="Myanmar" <?if($area=="Myanmar"){pri
<option value="Romanian" <?if($area=="Romanian"){pr
<option value="Russian" <?if($area=="Russian"){pri
</select>
<option value="" selected>hýžg </option>
This line is SELECTing the first row of your drop-down box no matter what. have a look at the source code it is generating
This line is SELECTing the first row of your drop-down box no matter what. have a look at the source code it is generating
ASKER
Hi basiclife. Thanks for the respones.
The first line ( <option value="" selected>hýžg </option>) is basically there so that if the user doesn't want to specify any parametes s/he just selects <option value="" selected>hýžg </option> (which is the default selected option from the list) and all rows (teachers) are displayed. I don't want to lose this functionality.
The first line ( <option value="" selected>hýžg </option>) is basically there so that if the user doesn't want to specify any parametes s/he just selects <option value="" selected>hýžg </option> (which is the default selected option from the list) and all rows (teachers) are displayed. I don't want to lose this functionality.
If no SELECTED is present, the first item in the list will be chosen by default (as you want). If someone HAS chosen an option, however, that item will have a SELCTED, so will be chosen
You could always put it in logic if you are unhappy withr elying on a browser defaulting...
<option value="" <?if($area==""){print " SELECTED";}?>>hýžg </option>
<option value="English" <?if($area=="English"){pri nt " SELECTED";}?>>ñž</OPTION>
...
etc.
You could always put it in logic if you are unhappy withr elying on a browser defaulting...
<option value="" <?if($area==""){print " SELECTED";}?>>hýžg </option>
<option value="English" <?if($area=="English"){pri
...
etc.
ASKER
Hi,
The same problem continues. I've typed in...
<select name="language" class="style28" id="language">
<option value="" <?if($area==""){print " SELECTED";}?>>hýžg </option>
<option value="English" <?if($area=="English"){pri nt " SELECTED";}?>>ñž</OPTION>
<option value="korean" <?if($area=="korean"){prin t " SELECTED";}?>>Óýž</OPTION>
etc...
...but still the parameters don't carry on after they have been displayed once.
Thanks
The same problem continues. I've typed in...
<select name="language" class="style28" id="language">
<option value="" <?if($area==""){print " SELECTED";}?>>hýžg </option>
<option value="English" <?if($area=="English"){pri
<option value="korean" <?if($area=="korean"){prin
etc...
...but still the parameters don't carry on after they have been displayed once.
Thanks
>> the parameters don't carry on after they have been displayed once
Hmmm... what do you do to carry $area from one display to the other?
You should have something like
<?php
session_start();
$area=trim( ' ' . @REQUEST['language'];
....
Can you paste here the equivalent lines you currently have?
Hmmm... what do you do to carry $area from one display to the other?
You should have something like
<?php
session_start();
$area=trim( ' ' . @REQUEST['language'];
....
Can you paste here the equivalent lines you currently have?
ASKER
Okay, the entire results page code is as follows. I'm sorry I've pasted it here. I'm not really a programmer and wasn't sure what was relevent and what wasn't.
<?php require_once('../Connectio ns/connect iona.php') ; ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_m = 30;
$pageNum_m = 0;
if (isset($_GET['pageNum_m']) ) {
$pageNum_m = $_GET['pageNum_m'];
}
$startRow_m = $pageNum_m * $maxRows_m;
mysql_select_db($database_ connection a, $connectiona);
$query_m = "SELECT TestTable.autonumber, TestTable.sex, TestTable.firstname, TestTable.nationality, TestTable.private_price FROM TestTable WHERE TestTable.language LIKE '%" . $_REQUEST["language"] . "%' AND TestTable.prefecture LIKE '%" . $_REQUEST["prefecture"] . "%'";
$query_limit_m = sprintf("%s LIMIT %d, %d", $query_m, $startRow_m, $maxRows_m);
$m = mysql_query($query_limit_m , $connectiona) or die(mysql_error());
$row_m = mysql_fetch_assoc($m);
if (isset($_GET['totalRows_m' ])) {
$totalRows_m = $_GET['totalRows_m'];
} else {
$all_m = mysql_query($query_m);
$totalRows_m = mysql_num_rows($all_m);
}
$totalPages_m = ceil($totalRows_m/$maxRows _m)-1;
$colname_d = "-1";
if (isset($_GET['recordID'])) {
$colname_d = (get_magic_quotes_gpc()) ? $_GET['recordID'] : addslashes($_GET['recordID ']);
}
mysql_select_db($database_ connection a, $connectiona);
$query_d = "SELECT date_format(date, '%d %M %Y') as date, autonumber, photo, imagelocation, imagelocation2, video, vid, sex, firstname, fullname, age, nationality, `language`, OthLanguage, teachingexperience, LangSchls, LangQual, qualifications, otherexper, TMethd, jap_ability, likes, dislikes, fav_movie, areas, prefecture, mm, ma, me, tm, ta, te, wm, wa, we, thm, tha, the, fm, fa, fe, sm, sa, se, `sum`, sua, sue, private_price, group_price, firstlesson, message, contactmail, contactnum FROM TestTable WHERE autonumber = {$colname_d}";
$d = mysql_query($query_d, $connectiona) or die(mysql_error());
$row_d = mysql_fetch_assoc($d);
$totalRows_d = mysql_num_rows($d);
$queryString_m = "";
if (!empty($_SERVER['QUERY_ST RING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_m") == false &&
stristr($param, "totalRows_m") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_m = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_m = sprintf("&totalRows_m=%d%s ", $totalRows_m, $queryString_m);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Private Lesson - Teacher Profile</title>
<style type="text/css" media="screen">
#container
{
width: 761px;
margin: 0px auto;
background-color: #fff;
color: #333;
border: 1px solid orange;
line-height: 130%;
}
#top
{
background-color: #ddd;
}
#top h1
{
padding: 0;
margin: 0;
}
#rightnav
{
float: right;
width: 265px;
margin: 0;
padding: 1em;
}
#content
{
width: 445px;
border-right: 1px solid orange;
}
#footer
{
clear: both;
margin: 0;
color: #333;
background-color: ##FBE775;
border-top: 1px solid orange;
}
#rightnav p { margin: 0 0 1em 0; }
#content h2 { margin: 0 0 .5em 0; }
.style33 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
body {
background-color: #FFAD77;
margin-left: 0px;
margin-top: 0px;
}
.style38 {font-size: 12px}
.style57 {font-size: 10px; color: #FF6600; font-family: Arial, Helvetica, sans-serif; }
.style71 {color: #FFFFFF}
.style70 {color: #0000FF}
.lefttile {
background-image: url(graphics/Words/find%20 a%20teache r/Japanese %20Homepag e/New%20Fo lder2/imag es/Newprof ile_r5_c1. gif);
}
.righttile {
background-image: url(graphics/Words/find%20 a%20teache r/Japanese %20Homepag e/New%20Fo lder2/imag es/Newprof ile_r5_c7. gif);
}
.upperrighttile {
background-image: url(graphics/Words/find%20 a%20teache r/Japanese %20Homepag e/New%20Fo lder2/imag es/Newprof ile_r3_c7. gif);
}
.style73 {font-size: 14}
.style78 {font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; }
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre loadImages .arguments ; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_CheckFlashVersion(reqVe rStr,msg){
with(navigator){
var isIE = (appVersion.indexOf("MSIE" ) != -1 && userAgent.indexOf("Opera") == -1);
var isWin = (appVersion.toLowerCase(). indexOf("w in") != -1);
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer = parseFloat(verMajor + "." + verMinor);
}
}
// WebTV has Flash Player 4 or lower -- too low for video
else if (userAgent.toLowerCase().i ndexOf("we btv") != -1) flashVer = 4.0;
var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
if (flashVer < reqVer){
if (confirm(msg))
window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
//-->
</script>
</head>
<body onLoad=";MM_CheckFlashVers ion('8,0,0 ,0','Conte nt on this page requires a newer version of Macromedia Flash Player. Do you want to download it now?')">
<div id="container">
<div id="top">
<table border="0" cellpadding="0" cellspacing="0" width="761">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="inputtitle.png" fwbase="title.gif" fwstyle="Dreamweaver" fwdocid = "301477140" fwnested="1" -->
<tr>
<td width="761" height="51" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="761">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="membersprofile.png" fwbase="profile3.gif" fwstyle="Dreamweaver" fwdocid = "301477140" fwnested="1" -->
<tr>
<td width="761" height="51" valign="top" bgcolor="#FFFFFF"><table border="0" cellpadding="0" cellspacing="0" width="760">
<!-- fwtable fwsrc="title_studentheader .png" fwbase="profiletitle.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="1" -->
<tr>
<td><img name="profiletitle_r1_c1" src="images/profiletitle_r 1_c1.jpg" width="706" height="95" border="0" alt=""></td>
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="54">
<tr>
<td><img name="profiletitle_r1_c2" src="images/profiletitle_r 1_c2.jpg" width="54" height="68" border="0" alt=""></td>
</tr>
<tr>
<td><a href="index.php"><img name="profiletitle_r2_c2" src="images/profiletitle_r 2_c2.jpg" width="54" height="27" border="0" alt=""></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</div>
<div id="rightnav"><img src="graphics/Words/find%2 0a%20teach er/Japanes e%20Homepa ge/teacher s.jpg" width="267" height="110">
<table border="0">
<tr>
<td width="36"><div align="center"><span class="style57">sex</span> </div></td >
<td width="64"><div align="center"><span class="style57">firstname< /span></di v></td>
<td width="71"><div align="center"><span class="style57">nationalit y</span></ div></td>
<td width="82"><div align="center"><span class="style57">private_pr ice</span> </div></td >
</tr>
<?php do { ?>
<tr>
<td><div align="center"><span class="style57"><?php echo $row_m['sex']; ?></span></div></td>
<td><div align="center"><span class="style57"><a href="NewMemberTeacherProf ile0.php?l anguage=<? php echo $_GET['language'] ?>&prefecture=<?php echo $_GET['prefecture'] ?>&recordID=<?php echo $row_m['autonumber']; ?>" class="style45"><font size="1" face="Arial, Helvetica, sans-serif"><?php echo $row_m['firstname']; ?></font></a></span></div> </td>
<td><div align="center"><span class="style57"><?php echo $row_m['nationality']; ?></span></div></td>
<td><div align="center"><span class="style57"><?php echo $row_m['private_price']; ?></span></div></td>
</tr>
<?php } while ($row_m = mysql_fetch_assoc($m)); ?>
</table>
<br>
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center"><?php if ($pageNum_m > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_m=%d%s" , $currentPage, 0, $queryString_m); ?>"><img src="graphics/Words/find a teacher/logosandbanners/ar rows/OFirs t.gif" width="18" height="13" border=0></a>
<?php } // Show if not first page ?>
</td>
<td width="31%" align="center"><?php if ($pageNum_m > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_m=%d%s" , $currentPage, max(0, $pageNum_m - 1), $queryString_m); ?>"><img src="graphics/Words/find a teacher/logosandbanners/ar rows/OPrev ious.gif" width="14" height="13" border=0></a>
<?php } // Show if not first page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_m < $totalPages_m) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_m=%d%s" , $currentPage, min($totalPages_m, $pageNum_m + 1), $queryString_m); ?>"><img src="graphics/Words/find%2 0a%20teach er/logosan dbanners/a rrows/ONex t.gif" width="14" height="13" border=0></a>
<?php } // Show if not last page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_m < $totalPages_m) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_m=%d%s" , $currentPage, $totalPages_m, $queryString_m); ?>"><img src="graphics/Words/find%2 0a%20teach er/logosan dbanners/a rrows/OLas t.gif" width="18" height="13" border=0></a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>
<br>
</div>
<div id="content">
<table border="0" cellpadding="0" cellspacing="0" width="445">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="profileOrangutan.pn g" fwbase="profile.gif" fwstyle="Dreamweaver" fwdocid = "2007693981" fwnested="1" -->
<tr>
<td width="445" height="1345" valign="top"><table width="445" height="1379" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="TEST2newprofileOran gutan.png" fwbase="Newprofile.gif" fwstyle="Dreamweaver" fwdocid = "2007693981" fwnested="1" -->
<tr>
<td width="445" height="35" valign="top"><div align="center"><span class="style11 style33 style38"><font color="#FF6600" face="Arial, Helvetica, sans-serif">こӗ 8;プ ロ&# 12501; 451;Ӧ 0;ル は</ font> <span class="style70"><?php echo $row_d['date']; ?></span> <font color="#FF6600" face="Arial, Helvetica, sans-serif"> に追加&# 12414; 383;ӗ 9;更 新&# 12373; 428;ә 4;し た </font></span></div></td>
</tr>
<tr>
<td height="43"><img name="Newprofile_r2_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r2_c1.gif" width="445" height="43" border="0" alt=""></td>
</tr>
<tr>
<td height="166"><table width="445" height="166" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="24" height="166"><img name="Newprofile_r3_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r3_c1.gif" width="24" height="166" border="0" alt=""></td>
<td width="144"><table width="144" height="166" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="144" height="116" valign="top"><img name="Newprofile_r4_c3" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r4_c3.gif" width="144" height="50" border="0" alt=""><img src="<?php echo $row_d['imagelocation']; ?>" alt="" width="136" height="116"></td>
</tr>
<tr>
<td height="50"><!--DWLayoutEm ptyCell--> </td >
</tr>
</table></td>
<td width="19"><img name="Newprofile_r3_c4" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r3_c4.gif" width="19" height="166" border="0" alt=""></td>
<td width="236" valign="top"><span class="style38"><span class="style38 style33"> 氏 1517;</spa n> <span class="style38 style33"><span class="style70"><?php echo $row_d['fullname']; ?></span><br>
<br>
国籍</sp an> <span class="style38 style33"><span class="style70"><?php echo $row_d['nationality']; ?></span><br>
<br>
母国# 486;</span > <span class="style33"><span class="style70"><?php echo $row_d['language']; ?></span><br>
<br>
年齢<fon t color="#0000FF"> </font><font color="#0000FF"><?php echo $row_d['age']; ?></font></span></span></t d>
<td width="22" valign="top" class="upperrighttile"><im g src="graphics/Words/find%2 0a%20teach er/Japanes e%20Homepa ge/New%20F older2/ima ges/Newpro file_r3_c7 .gif" width="22" height="166"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="572"><table width="445" height="572" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="18" height="572" valign="top" class="lefttile"><img src="graphics/Words/find%2 0a%20teach er/Japanes e%20Homepa ge/New%20F older2/ima ges/Newpro file_r5_c1 .gif" width="18" height="572"></td>
<td width="405" valign="top"><P><span class="style33"><span class="style73">  945;४ 7;経 験</ span><span class="style70"><?php echo $row_d['teachingexperience ']; ?></span> 年<BR >
<br>
英会# 441;ӟ 3;ク ー&# 12523; <span class="style70"><?php echo $row_d['LangSchls']; ?></span><BR>
<br>
教員$ 039;੬ 4;<span class="style70"><?php echo $row_d['LangQual']; ?></span><BR>
<br>
その 182;ณ 9;格 ( 大学・&# 30701; 823;)<FONT
color=#0000ff> <?php echo $row_d['qualifications']; ?><br>
</FONT> <br>
</span><span class="style33">  381;ӗ 8;他 経&# 39443;<spa n class="style70"><?php echo $row_d['otherexper']; ?></span><br>
<br>
その 182;এ 1;意 な&# 35328;# 486;<span class="style70"><?php echo $row_d['OthLanguage']; ?></span><BR>
<br>
日本# 486;Ӥ 4;ベ ル<s pan class="style70"><?php echo $row_d['jap_ability']; ?></span><BR>
<br>
好き 394;ә 8;の <FONT color=#0000ff> </FONT ><span class="style70"><?php echo $row_d['likes']; ?></span><BR>
きら 356;ӗ 4;も の&n bsp;<span class="style70"><?php echo $row_d['dislikes']; ?></span><BR>
好き 394;ਸ਼ 4;画 <spa n class="style70"><?php echo $row_d['fav_movie']; ?></span></span></P>
<p align="left" class="style33">  152;ࢷ 2;地 <spa n class="style70"><?php echo $row_d['prefecture']; ?></span><BR>
出張 487;೦ 1;な 地&# 22495;&nbs p;<FONT size=2><font color="#0000FF"><span class="style70"><?php echo $row_d['areas']; ?><br>
<br>
</span></font></FONT>  ;プ& #12521; 2452;} 05;ー ;ト& #12524; 2483;| 73;ン ;料& #65288; 1 時間当&# 12383; 426;ᦀ 9; <span class="style70"><?php echo $row_d['private_price']; ?></span><BR>
グル 540;Ӣ 3;レ ッ&# 12473; 531;ਨ 9;( 1 時間当&# 12383; 426;ᦀ 9;<span class="style70"><?php echo $row_d['group_price']; ?></span><BR>
初回 480;ઊ 9;料 <span class="style70"><?php echo $row_d['firstlesson']; ?></span><BR>
<br>
メッ 475;Ӧ 0;ジ <br>
<span class="style70"><?php echo $row_d['message']; ?></span><br>
<span class="style70"> &nbs p;</span>< BR>
電話 058;ࡥ 5; <span class="style38"><font color="#FF0000">メ&# 12531; 496;Ӧ 0;用 </font></s pan><STRON G> </ STRONG><BR >
E メール&# 12450; 489;Ӥ 4;ス <spa n class="style38"><font color="#FF0000">メ&# 12531; 496;Ӧ 0;用 </font></s pan></p></ td>
<td width="22" valign="top" class="righttile"><img src="graphics/Words/find%2 0a%20teach er/Japanes e%20Homepa ge/New%20F older2/ima ges/Newpro file_r5_c7 .gif" width="22" height="572"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="62"><img name="Newprofile_r6_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r6_c1.gif" width="445" height="62" border="0" alt=""></td>
</tr>
<tr>
<td height="254"><table width="445" height="254" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="24" height="254"><img name="Newprofile_r7_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r7_c1.gif" width="24" height="254" border="0" alt=""></td>
<td width="399" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="399" height="254" valign="top" bgcolor="#FF6600"><table width="399" border="0">
<tr>
<td> </td>
<td><div align="center" class="style71"><span class="style43">午&# 21069;</sp an></div>< /td>
<td><div align="center" class="style71"><span class="style43">午&# 24460;</sp an></div>< /td>
<td><div align="center" class="style71"><span class="style43">夜&# 38291;</sp an></div>< /td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">月&# 26332; 085;</span ></div>
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['mm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['ma']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['me']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">火&# 26332; 085;</span ></div>
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['tm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['ta']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['te']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">水&# 26332; 085;</span ></div>
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['wm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['wa']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['we']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">木&# 26332; 085;</span ></div>
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['thm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['tha']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['the']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">金&# 26332; 085;</span ></div>
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['fm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['fa']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['fe']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">土&# 26332; 085;</span ></div>
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sa']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['se']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">日&# 26332; 085;</span ></div>
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sum']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sua']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sue']; ?></span></div></td>
</tr>
</table></td>
</tr>
</table> </td>
<td width="22"><img name="Newprofile_r7_c7" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r7_c7.gif" width="22" height="254" border="0" alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td height="62"><img name="Newprofile_r8_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r8_c1.gif" width="445" height="62" border="0" alt=""></td>
</tr>
<tr>
<td height="140"><table width="445" height="140" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="24" height="140"><img name="Newprofile_r9_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r9_c1.gif" width="24" height="140" border="0" alt=""></td>
<td width="394" valign="top" bgcolor="#000000"><div align="center">
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="180" height="135" id="FLVPlayer">
<param name="movie" value="FLVPlayer_Progressi ve.swf" />
<param name="salign" value="lt" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="FlashVars" value="&MM_ComponentVersio n=1&skinNa me=Clear_S kin_1&stre amName=<?p hp echo $row_d['video']; ?>&autoPlay=false&autoRewi nd=false" />
<embed src="FLVPlayer_Progressive .swf" flashvars="&MM_ComponentVe rsion=1&sk inName=Cle ar_Skin_1& streamName =<?php echo $row_d['video']; ?>&autoPlay=false&autoRewi nd=false" quality="high" scale="noscale" width="180" height="135" name="FLVPlayer" salign="LT" type="application/x-shockw ave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div></td>
<td width="27"><img name="Newprofile_r9_c6" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r9_c6.gif" width="27" height="140" border="0" alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td height="45"><img name="Newprofile_r10_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_ r10_c1.gif " width="445" height="45" border="0" alt=""></td>
</tr>
</table></td>
</tr>
</table>
</div>
<div id="footer"><img src="lowerbanner761.jpg" width="761" height="20"></div>
</div>
</body>
</html>
<?php
mysql_free_result($m);
mysql_free_result($d);
?>
<?php require_once('../Connectio
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_m = 30;
$pageNum_m = 0;
if (isset($_GET['pageNum_m'])
$pageNum_m = $_GET['pageNum_m'];
}
$startRow_m = $pageNum_m * $maxRows_m;
mysql_select_db($database_
$query_m = "SELECT TestTable.autonumber, TestTable.sex, TestTable.firstname, TestTable.nationality, TestTable.private_price FROM TestTable WHERE TestTable.language LIKE '%" . $_REQUEST["language"] . "%' AND TestTable.prefecture LIKE '%" . $_REQUEST["prefecture"] . "%'";
$query_limit_m = sprintf("%s LIMIT %d, %d", $query_m, $startRow_m, $maxRows_m);
$m = mysql_query($query_limit_m
$row_m = mysql_fetch_assoc($m);
if (isset($_GET['totalRows_m'
$totalRows_m = $_GET['totalRows_m'];
} else {
$all_m = mysql_query($query_m);
$totalRows_m = mysql_num_rows($all_m);
}
$totalPages_m = ceil($totalRows_m/$maxRows
$colname_d = "-1";
if (isset($_GET['recordID']))
$colname_d = (get_magic_quotes_gpc()) ? $_GET['recordID'] : addslashes($_GET['recordID
}
mysql_select_db($database_
$query_d = "SELECT date_format(date, '%d %M %Y') as date, autonumber, photo, imagelocation, imagelocation2, video, vid, sex, firstname, fullname, age, nationality, `language`, OthLanguage, teachingexperience, LangSchls, LangQual, qualifications, otherexper, TMethd, jap_ability, likes, dislikes, fav_movie, areas, prefecture, mm, ma, me, tm, ta, te, wm, wa, we, thm, tha, the, fm, fa, fe, sm, sa, se, `sum`, sua, sue, private_price, group_price, firstlesson, message, contactmail, contactnum FROM TestTable WHERE autonumber = {$colname_d}";
$d = mysql_query($query_d, $connectiona) or die(mysql_error());
$row_d = mysql_fetch_assoc($d);
$totalRows_d = mysql_num_rows($d);
$queryString_m = "";
if (!empty($_SERVER['QUERY_ST
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_m") == false &&
stristr($param, "totalRows_m") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_m = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_m = sprintf("&totalRows_m=%d%s
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Private Lesson - Teacher Profile</title>
<style type="text/css" media="screen">
#container
{
width: 761px;
margin: 0px auto;
background-color: #fff;
color: #333;
border: 1px solid orange;
line-height: 130%;
}
#top
{
background-color: #ddd;
}
#top h1
{
padding: 0;
margin: 0;
}
#rightnav
{
float: right;
width: 265px;
margin: 0;
padding: 1em;
}
#content
{
width: 445px;
border-right: 1px solid orange;
}
#footer
{
clear: both;
margin: 0;
color: #333;
background-color: ##FBE775;
border-top: 1px solid orange;
}
#rightnav p { margin: 0 0 1em 0; }
#content h2 { margin: 0 0 .5em 0; }
.style33 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
body {
background-color: #FFAD77;
margin-left: 0px;
margin-top: 0px;
}
.style38 {font-size: 12px}
.style57 {font-size: 10px; color: #FF6600; font-family: Arial, Helvetica, sans-serif; }
.style71 {color: #FFFFFF}
.style70 {color: #0000FF}
.lefttile {
background-image: url(graphics/Words/find%20
}
.righttile {
background-image: url(graphics/Words/find%20
}
.upperrighttile {
background-image: url(graphics/Words/find%20
}
.style73 {font-size: 14}
.style78 {font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; }
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_CheckFlashVersion(reqVe
with(navigator){
var isIE = (appVersion.indexOf("MSIE"
var isWin = (appVersion.toLowerCase().
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer = parseFloat(verMajor + "." + verMinor);
}
}
// WebTV has Flash Player 4 or lower -- too low for video
else if (userAgent.toLowerCase().i
var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
if (flashVer < reqVer){
if (confirm(msg))
window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
//-->
</script>
</head>
<body onLoad=";MM_CheckFlashVers
<div id="container">
<div id="top">
<table border="0" cellpadding="0" cellspacing="0" width="761">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="inputtitle.png" fwbase="title.gif" fwstyle="Dreamweaver" fwdocid = "301477140" fwnested="1" -->
<tr>
<td width="761" height="51" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="761">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="membersprofile.png"
<tr>
<td width="761" height="51" valign="top" bgcolor="#FFFFFF"><table border="0" cellpadding="0" cellspacing="0" width="760">
<!-- fwtable fwsrc="title_studentheader
<tr>
<td><img name="profiletitle_r1_c1" src="images/profiletitle_r
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="54">
<tr>
<td><img name="profiletitle_r1_c2" src="images/profiletitle_r
</tr>
<tr>
<td><a href="index.php"><img name="profiletitle_r2_c2" src="images/profiletitle_r
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</div>
<div id="rightnav"><img src="graphics/Words/find%2
<table border="0">
<tr>
<td width="36"><div align="center"><span class="style57">sex</span>
<td width="64"><div align="center"><span class="style57">firstname<
<td width="71"><div align="center"><span class="style57">nationalit
<td width="82"><div align="center"><span class="style57">private_pr
</tr>
<?php do { ?>
<tr>
<td><div align="center"><span class="style57"><?php echo $row_m['sex']; ?></span></div></td>
<td><div align="center"><span class="style57"><a href="NewMemberTeacherProf
<td><div align="center"><span class="style57"><?php echo $row_m['nationality']; ?></span></div></td>
<td><div align="center"><span class="style57"><?php echo $row_m['private_price']; ?></span></div></td>
</tr>
<?php } while ($row_m = mysql_fetch_assoc($m)); ?>
</table>
<br>
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center"><?php if ($pageNum_m > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_m=%d%s"
<?php } // Show if not first page ?>
</td>
<td width="31%" align="center"><?php if ($pageNum_m > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_m=%d%s"
<?php } // Show if not first page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_m < $totalPages_m) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_m=%d%s"
<?php } // Show if not last page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_m < $totalPages_m) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_m=%d%s"
<?php } // Show if not last page ?>
</td>
</tr>
</table>
<br>
</div>
<div id="content">
<table border="0" cellpadding="0" cellspacing="0" width="445">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="profileOrangutan.pn
<tr>
<td width="445" height="1345" valign="top"><table width="445" height="1379" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="TEST2newprofileOran
<tr>
<td width="445" height="35" valign="top"><div align="center"><span class="style11 style33 style38"><font color="#FF6600" face="Arial, Helvetica, sans-serif">こӗ
</tr>
<tr>
<td height="43"><img name="Newprofile_r2_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
</tr>
<tr>
<td height="166"><table width="445" height="166" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="24" height="166"><img name="Newprofile_r3_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
<td width="144"><table width="144" height="166" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="144" height="116" valign="top"><img name="Newprofile_r4_c3" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
</tr>
<tr>
<td height="50"><!--DWLayoutEm
</tr>
</table></td>
<td width="19"><img name="Newprofile_r3_c4" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
<td width="236" valign="top"><span class="style38"><span class="style38 style33"> 氏
<br>
国籍</sp
<br>
母国#
<br>
年齢<fon
<td width="22" valign="top" class="upperrighttile"><im
</tr>
</table></td>
</tr>
<tr>
<td height="572"><table width="445" height="572" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="18" height="572" valign="top" class="lefttile"><img src="graphics/Words/find%2
<td width="405" valign="top"><P><span class="style33"><span class="style73"> 
<br>
英会#
<br>
教員$
<br>
その
color=#0000ff> <?php echo $row_d['qualifications']; ?><br>
</FONT> <br>
</span><span class="style33"> 
<br>
その
<br>
日本#
<br>
好き
きら
好き
<p align="left" class="style33"> 
出張
<br>
</span></font></FONT> 
グル
初回
<br>
メッ
<span class="style70"><?php echo $row_d['message']; ?></span><br>
<span class="style70"> &nbs
電話
E メール&#
<td width="22" valign="top" class="righttile"><img src="graphics/Words/find%2
</tr>
</table></td>
</tr>
<tr>
<td height="62"><img name="Newprofile_r6_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
</tr>
<tr>
<td height="254"><table width="445" height="254" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="24" height="254"><img name="Newprofile_r7_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
<td width="399" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="399" height="254" valign="top" bgcolor="#FF6600"><table width="399" border="0">
<tr>
<td> </td>
<td><div align="center" class="style71"><span class="style43">午&#
<td><div align="center" class="style71"><span class="style43">午&#
<td><div align="center" class="style71"><span class="style43">夜&#
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">月&#
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['mm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['ma']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['me']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">火&#
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['tm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['ta']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['te']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">水&#
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['wm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['wa']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['we']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">木&#
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['thm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['tha']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['the']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">金&#
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['fm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['fa']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['fe']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">土&#
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sm']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sa']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['se']; ?></span></div></td>
</tr>
<tr>
<td><div align="right" class="style71">
<div align="center"><span class="style43">日&#
</div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sum']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sua']; ?></span></div></td>
<td><div align="center" class="style78"><span class="style38"><?php echo $row_d['sue']; ?></span></div></td>
</tr>
</table></td>
</tr>
</table> </td>
<td width="22"><img name="Newprofile_r7_c7" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
</tr>
</table></td>
</tr>
<tr>
<td height="62"><img name="Newprofile_r8_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
</tr>
<tr>
<td height="140"><table width="445" height="140" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="24" height="140"><img name="Newprofile_r9_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
<td width="394" valign="top" bgcolor="#000000"><div align="center">
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="FLVPlayer_Progressi
<param name="salign" value="lt" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="FlashVars" value="&MM_ComponentVersio
<embed src="FLVPlayer_Progressive
</object>
</div></td>
<td width="27"><img name="Newprofile_r9_c6" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
</tr>
</table></td>
</tr>
<tr>
<td height="45"><img name="Newprofile_r10_c1" src="graphics/Words/find a teacher/Japanese Homepage/New Folder2/images/Newprofile_
</tr>
</table></td>
</tr>
</table>
</div>
<div id="footer"><img src="lowerbanner761.jpg" width="761" height="20"></div>
</div>
</body>
</html>
<?php
mysql_free_result($m);
mysql_free_result($d);
?>
ASKER
The code of the page (the home page) featuring the search box is as follows (again sorry if I've pasted too much - I'm concerned that I may miss out something relevant):
<?php require_once('../Connectio ns/connect iona.php') ; ?>
<?php
mysql_select_db($database_ connection a, $connectiona);
$query_a = "SELECT autonumber, imagelocation, imagelocation2, firstname, nationality, prefecture, private_price FROM TestTable";
$a = mysql_query($query_a, $connectiona) or die(mysql_error());
$row_a = mysql_fetch_assoc($a);
$totalRows_a = mysql_num_rows($a);
?>
<?php
// *** Validate request to login to this site.
session_start();
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
$GLOBALS['PrevUrl'] = $accesscheck;
session_register('PrevUrl' );
}
if (isset($_POST['compemail'] )) {
$loginUsername=$_POST['com pemail'];
$password=$_POST['password '];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "MemberProfiles/Members Lounge.php";
$MM_redirectLoginFailed = "Jsorry.htm";
$MM_redirecttoReferrer = false;
mysql_select_db($database_ connection a, $connectiona);
$LoginRS__query=sprintf("S ELECT compemail, password FROM students WHERE compemail='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername) , get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__quer y, $connectiona) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$GLOBALS['MM_Username'] = $loginUsername;
$GLOBALS['MM_UserGroup'] = $loginStrGroup;
//register the session variables
session_register("MM_Usern ame");
session_register("MM_UserG roup");
if (isset($_SESSION['PrevUrl' ]) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<?php
$area = isset($_REQUEST['area'])?$ _REQUEST[' area']:""; //Default to no area, but retrieve from previous page if possible.
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ñqìùó - ͤƣÖHh×é¤ÙüÈìùó.ÞóÄüÞóûýžY+h× é¤ÙüÈìùó< /title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
<meta name="description" content="×é¤ÙüÈñqìùó,Y+’ ¢WfD~YK.ý žnY+’¢WfD‹ ºn_nµ¨ÈgY " />
<meta name="keywords" content="Orangutan Japan ñž,ñq,×é¤ÙüÈìùó,×é¤ÙüÈñ qìùó,ñq +,ÞóÄüÞó,ì ùó,ýž,žf ,×é¤ÙüÈìù ó,H,ñž f!,º,×é¤ÙüÈ,ºìùó,ñqY¤,¢Y,-ýž,žfY+’¢Y ,žf,ÞóÄüÞó ,q¬,å,¬ý, äK,^HÝ,'*,ü‰,CI,¡q,Y+’¢WfD ~YK,Õéó¹ž,ɤĞ,¹Ñ¤óž" />
<meta name="robots" content="all" />
<META NAME="copyright" CONTENT="Copyright c 2005 OrangutanEnglish, OrangutanJapan"><style type="text/css">
<!--
body {
background-color: #FFAD77;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
}
a:link {
color: #FF6600;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FF6600;
}
a:hover {
text-decoration: underline;
color: #FF6600;
}
a:active {
text-decoration: none;
color: #FF6600;
}
.style17 {
color: #FF6600;
font-size: 12px;
}
.style19 {color: #FF0000}
.style20 {color: #000000}
.style22 {font-size: 9px}
.style28 {font-size: 12px}
.style55 {color: #000000; font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
.style58 {
font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
color: #FF6600;
}
.style61 {color: #FFFFFF}
.style62 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
.style67 {color: #FF6600; font-size: 14px; }
.style71 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.style72 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
}
.style74 {
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
}
.style75 {font-size: 14px}
.style76 {font-weight: bold; color: #FF3300;}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre loadImages .arguments ; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x= a[i])&&x.o Src;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&p arent.fram es.length) {
d=parent.frames[n.substrin g(p+1)].do cument; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length; i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d. layers.len gth;i++) x=MM_findObj(n,d.layers[i] .document) ;
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arg uments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+= 3)
if ((x=MM_findObj(a[i]))!=nul l){documen t.MM_sr[j+ +]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onLoad="MM_preloadImages(' newfront/i mages/newf rontpage_r 2_c2_f2.jp g','newfro nt/images/ newfrontpa ge_r3_c8_f 3.jpg','ne wfront/ima ges/newfro ntpage_r2_ c3_f2.jpg' ,'newfront /images/ne wfrontpage _r3_c8_f4. jpg','newf ront/image s/newfront page_r2_c4 _f2.jpg',' newfront/i mages/newf rontpage_r 3_c8_f5.jp g','newfro nt/images/ newfrontpa ge_r2_c5_f 2.jpg','ne wfront/ima ges/newfro ntpage_r3_ c8_f6.jpg' ,'newfront /images/ne wfrontpage _r2_c6_f2. jpg','newf ront/image s/newfront page_r3_c8 _f7.jpg',' newquickse archbottom 1.jpg','im ages/whatw eoffer_r2_ c2_f2.gif' ,'images/w hatweoffer imagedelet e_r2_c2_f2 .gif')">
<Div Align="Center">
<table width="761" border="0" cellpadding="0" cellspacing="1" bgcolor="#FF6600">
<!--DWLayoutTable-->
<tr>
<td width="760" height="779" valign="top"><table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td height="95" colspan="3" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="760">
<!-- fwtable fwsrc="newjapanesepagetitl e.png" fwbase="newjapanesepagetit le.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="1" -->
<tr>
<td><img name="newjapanesepagetitle _r1_c1" src="images/newjapanesepag etitle_r1_ c1.jpg" width="523" height="95" border="0" alt="ñqìùó nH"></td>
<td><table width="237" height="95" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="237" height="44"><img name="newjapanesepagetitle _r1_c2" src="images/newjapanesepag etitle_r1_ c2.jpg" width="237" height="44" border="0" alt="OrangutanÞóÄüÞóû×é¤Ùü Èñqìùó"> </td>
</tr>
<tr>
<td height="51" valign="top" bgcolor="#FFFFCD"><form name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<div align="left"><span class="style22">
<input name="password" type="password" class="style22" id="password" size="6">
</span> <span class="style22">
<input name="compemail" type="text" id="compemail" size="10">
</span>
<input type=IMAGE
src="submitbutton1.gif" name="submit">
</div>
</form></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="297" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="3"></td>
</tr>
<tr>
<td height="291" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="760">
<!-- fwtable fwsrc="newfrontpage1.png" fwbase="newfrontpage.jpg" fwstyle="Dreamweaver" fwdocid = "1101099143" fwnested="1" -->
<tr>
<td><img name="newfrontpage_r1_c1" src="newfront/images/newfr ontpage_r1 _c1.jpg" width="1" height="294" border="0" alt=""></td>
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="759">
<tr>
<td><img name="newfrontpage_r1_c2" src="newfront/images/newfr ontpage_r1 _c2.jpg" width="759" height="4" border="0" alt=""></td>
</tr>
<tr>
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="759">
<tr>
<td><a href="http://www.orangutanjapan.com/NewMemberTeacherProfile-1.php?language=&prefecture=&Submit=T?û" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'newfrontp age_r2_c2' ,'','newfr ont/images /newfrontp age_r2_c2_ f2.jpg','n ewfrontpag e_r3_c8',' ','newfron t/images/n ewfrontpag e_r3_c8_f3 .jpg',1)"> <img name="newfrontpage_r2_c2" src="newfront/images/newfr ontpage_r2 _c2.jpg" width="94" height="39" border="0" alt="ýžY+h×é¤ÙüÈìùó"></a ></td>
<td><a href="What is OrangutanFindateacherNEW.h tm" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'newfrontp age_r2_c3' ,'','newfr ont/images /newfrontp age_r2_c3_ f2.jpg','n ewfrontpag e_r3_c8',' ','newfron t/images/n ewfrontpag e_r3_c8_f4 .jpg',1)"> <img name="newfrontpage_r2_c3" src="newfront/images/newfr ontpage_r2 _c3.jpg" width="93" height="39" border="0" alt="ýžY+’¢WfD~Y"></a></t d>
<td><a href="FAQNEW.htm" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'newfrontp age_r2_c4' ,'','newfr ont/images /newfrontp age_r2_c4_ f2.jpg','n ewfrontpag e_r3_c8',' ','newfron t/images/n ewfrontpag e_r3_c8_f5 .jpg',1)"> <img name="newfrontpage_r2_c4" src="newfront/images/newfr ontpage_r2 _c4.jpg" width="95" height="39" border="0" alt="ºh×é¤ÙüÈìùó"></a></td>
<td><a href="signup.php" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'newfrontp age_r2_c5' ,'','newfr ont/images /newfrontp age_r2_c5_ f2.jpg','n ewfrontpag e_r3_c8',' ','newfron t/images/n ewfrontpag e_r3_c8_f6 .jpg',1)"> <img name="newfrontpage_r2_c5" src="newfront/images/newfr ontpage_r2 _c5.jpg" width="94" height="39" border="0" alt="×é¤ÙüÈñqìùó"></a></ td>
<td><a href="OrangutanJapan_Teach erGuide.ht m" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'newfrontp age_r2_c6' ,'','newfr ont/images /newfrontp age_r2_c6_ f2.jpg','n ewfrontpag e_r3_c8',' ','newfron t/images/n ewfrontpag e_r3_c8_f7 .jpg',1)"> <img name="newfrontpage_r2_c6" src="newfront/images/newfr ontpage_r2 _c6.jpg" width="94" height="39" border="0" alt="ͤƣÖ+h×é¤ÙüÈìùó">< /a></td>
<td><img name="newfrontpage_r2_c7" src="newfront/images/newfr ontpage_r2 _c7.jpg" width="35" height="39" border="0" alt="ºh×é¤ÙüÈìùó"></td>
<td><a href="http://www.orangutanenglish.com"><img name="newfrontpage_r2_c9" src="newfront/images/newfr ontpage_r2 _c9.jpg" width="116" height="39" border="0" alt="ýžY+’¢WfD~Y"></a></t d>
<td><img name="newfrontpage_r2_c10" src="newfront/images/newfr ontpage_r2 _c10.jpg" width="56" height="39" border="0" alt="ºh×é¤ÙüÈìùó"></td>
<td><a href="JgetPassword.htm"><i mg name="newfrontpage_r2_c11" src="newfront/images/newfr ontpage_r2 _c11.jpg" width="82" height="39" border="0" alt="ýžY+’¢WfD~Y"></a></t d>
</tr>
</table></td>
</tr>
<tr>
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="759">
<tr>
<td><img name="newfrontpage_r3_c2" src="newfront/images/newfr ontpage_r3 _c2.jpg" width="498" height="251" border="0" alt="ñqìùó nH"></td>
<td><img name="newfrontpage_r3_c8" src="newfront/images/newfr ontpage_r3 _c8.jpg" width="261" height="251" border="0" alt="ͤƣÖHh×é¤ÙüÈñqìùó"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="148" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="9" height="148"> </td>
<td width="489" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF9900">
<!--DWLayoutTable-->
<tr>
<td width="340" height="148" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="340" height="148" valign="top" bgcolor="#FF9900"><div align="left"><span class="style58"><span class="style67"><span class="style17"> <spa n class="style76">Orangutan< /span></sp an></span> <span class="style61"> <span class="style75">o, Hh’’9ËY‹µ- Ó¹gY</span><br>
<span class="style62"><span class="style20"> &nbs p;<br>
Looking for a teacher? - <span class="style19">Get started now</span></span><br>
</span></span><span class="style55"> &nbs p;~Zo×íÕ£ü ë’‹fBj_k c_H’¢W~W‡F<br>
ÊYP×íÕ£üë’¯êï WfUD<br>
HTLBj_’…cfD~Y</span></span ><br>
<br>
<span sabprocessed="1" sabchildelements="1"><span sabprocessed="1" sabchildelements="10"><spa n sabprocessed="1" sabchildelements="1">  ;<span class="style71">Contact as many teachers as you like for just 2000yen</span></span></spa n></span>< /div></td>
</tr>
</table></td>
<td width="3"> </td>
<td width="148" valign="top"><img src="face1.jpg" alt="ñqìùónH" width="148" height="148"></td>
</tr>
</table></td>
<td width="10"> </td>
<td width="245" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FF6600">
<!--DWLayoutTable-->
<tr>
<td width="243" height="146" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="243" height="44" valign="top"><img src="newquicksearch1.jpg" alt="×é¤ÙüÈñqìùó" width="243" height="44"></td>
</tr>
<tr>
<td height="74" valign="top"><form name="form2" method="post" action="NewMemberTeacherPr ofile-1.ph p">
<table width="237" border="0">
<tr>
<td width="80"><div align="left"><img src="language.jpg" alt="ñqìùónH" width="60" height="20"></div></td>
<td width="147"><div align="left">
<select name="language" class="style28" id="language">
<option value="" <?if($area==""){print " SELECTED";}?>>hýžg </option>
<option value="English" <?if($area=="English"){pri nt " SELECTED";}?>>ñž</OPTION>
<option value="korean" <?if($area=="korean"){prin t " SELECTED";}?>>Óýž</OPTION>
<option value="Chinese" <?if($area=="Chinese"){pri nt " SELECTED";}?>>-ýž</OPTION>
<option value="Vietnamese" <?if($area=="Vietnamese"){ print " SELECTED";}?>>ÙÈÊàž</OPTIO N>
<option value="Azerbaijani" <?if($area=="Azerbaijani") {print " SELECTED";}?>>¢¼ëФ¸ãóž</O PTION>
<option value="Arabic" <?if($area=="Arabic"){prin t " SELECTED";}?>>¢éÓ¢ž</OPTIO N>
<option value="Italian" <?if($area=="Italian"){pri nt " SELECTED";}?>>¤¿ê¢ž</OPTIO N>
<option value="Indonesia" <?if($area=="Indonesia"){p rint " SELECTED";}?>>¤óÉÍ·¢ž</OPT ION>
<option value="Holland" <?if($area=="Holland"){pri nt " SELECTED";}?>>ªéóÀž</OPTIO N>
<option value="Estonia" <?if($area=="Estonia"){pri nt " SELECTED";}?>>¨¹ÈË¢ž</OPTI ON>
<option value="Cambodia" <?if($area=="Cambodia"){pr int " SELECTED";}?>>«óܸ¢ž</OPTI ON>
<option value="Spanish" <?if($area=="Spanish"){pri nt " SELECTED";}?>>¹Ú¤óž</OPTIO N>
<option value="Zulu" <?if($area=="Zulu"){print " SELECTED";}?>>ºüëüž</OPTIO N>
<option value="Thai" <?if($area=="Thai"){print " SELECTED";}?>>¿¤ž</OPTION>
<option value="Tagalog" <?if($area=="Tagalog"){pri nt " SELECTED";}?>>¿¬í°ž</OPTIO N>
<option value="Tamil" <?if($area=="Tamil"){print " SELECTED";}?>>¿ßëž</OPTION >
<option value="Danish" <?if($area=="Danish"){prin t " SELECTED";}?>>ÇóÞü¯ž</OPTI ON>
<option value="Turkish" <?if($area=="Turkish"){pri nt " SELECTED";}?>>È볞</OPTION >
<option value="German" <?if($area=="German"){prin t " SELECTED";}?>>ɤĞ</OPTION >
<option value="Nepalese" <?if($area=="Nepalese"){pr int " SELECTED";}?>>ÍÐüëž</OPTIO N>
<option value="Hindu" <?if($area=="Hindu"){print " SELECTED";}?>>Òóºüž</OPTIO N>
<option value="French" <?if($area=="French"){prin t " SELECTED";}?>>Õéó¹ž</OPTIO N>
<option value="Bulgarian" <?if($area=="Bulgarian"){p rint " SELECTED";}?>>Öë¬ê¢ž</OPTI ON>
<option value="Bengali" <?if($area=="Bengali"){pri nt " SELECTED";}?>>Ùó¬ëž</OPTIO N>
<option value="Portuguese" <?if($area=="Portuguese"){ print " SELECTED";}?>>ÝëȬëž</OPTI ON>
<option value="Polish" <?if($area=="Polish"){prin t " SELECTED";}?>>ÝüéóÉž</OPTI ON>
<option value="Myanmar" <?if($area=="Myanmar"){pri nt " SELECTED";}?>>ßãóÞüž</OPTI ON>
<option value="Romanian" <?if($area=="Romanian"){pr int " SELECTED";}?>>ëüÞË¢ž</OPTI ON>
<option value="Russian" <?if($area=="Russian"){pri nt " SELECTED";}?>>í·¢ž</OPTION >
</select>
</div></td>
</tr>
<tr>
<?php require_once('../Connectio
<?php
mysql_select_db($database_
$query_a = "SELECT autonumber, imagelocation, imagelocation2, firstname, nationality, prefecture, private_price FROM TestTable";
$a = mysql_query($query_a, $connectiona) or die(mysql_error());
$row_a = mysql_fetch_assoc($a);
$totalRows_a = mysql_num_rows($a);
?>
<?php
// *** Validate request to login to this site.
session_start();
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
$GLOBALS['PrevUrl'] = $accesscheck;
session_register('PrevUrl'
}
if (isset($_POST['compemail']
$loginUsername=$_POST['com
$password=$_POST['password
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "MemberProfiles/Members Lounge.php";
$MM_redirectLoginFailed = "Jsorry.htm";
$MM_redirecttoReferrer = false;
mysql_select_db($database_
$LoginRS__query=sprintf("S
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername)
$LoginRS = mysql_query($LoginRS__quer
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$GLOBALS['MM_Username'] = $loginUsername;
$GLOBALS['MM_UserGroup'] = $loginStrGroup;
//register the session variables
session_register("MM_Usern
session_register("MM_UserG
if (isset($_SESSION['PrevUrl'
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<?php
$area = isset($_REQUEST['area'])?$
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ñqìùó - ͤƣÖHh×é¤ÙüÈìùó.ÞóÄüÞóûýžY+h×
<meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
<meta name="description" content="×é¤ÙüÈñqìùó,Y+’
<meta name="keywords" content="Orangutan Japan ñž,ñq,×é¤ÙüÈìùó,×é¤ÙüÈñ
<meta name="robots" content="all" />
<META NAME="copyright" CONTENT="Copyright c 2005 OrangutanEnglish, OrangutanJapan"><style type="text/css">
<!--
body {
background-color: #FFAD77;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
}
a:link {
color: #FF6600;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FF6600;
}
a:hover {
text-decoration: underline;
color: #FF6600;
}
a:active {
text-decoration: none;
color: #FF6600;
}
.style17 {
color: #FF6600;
font-size: 12px;
}
.style19 {color: #FF0000}
.style20 {color: #000000}
.style22 {font-size: 9px}
.style28 {font-size: 12px}
.style55 {color: #000000; font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
.style58 {
font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
color: #FF6600;
}
.style61 {color: #FFFFFF}
.style62 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
.style67 {color: #FF6600; font-size: 14px; }
.style71 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.style72 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
}
.style74 {
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
}
.style75 {font-size: 14px}
.style76 {font-weight: bold; color: #FF3300;}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&p
d=parent.frames[n.substrin
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;
for(i=0;!x&&d.layers&&i<d.
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arg
if ((x=MM_findObj(a[i]))!=nul
}
//-->
</script>
</head>
<body onLoad="MM_preloadImages('
<Div Align="Center">
<table width="761" border="0" cellpadding="0" cellspacing="1" bgcolor="#FF6600">
<!--DWLayoutTable-->
<tr>
<td width="760" height="779" valign="top"><table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td height="95" colspan="3" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="760">
<!-- fwtable fwsrc="newjapanesepagetitl
<tr>
<td><img name="newjapanesepagetitle
<td><table width="237" height="95" border="0" align="left" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="237" height="44"><img name="newjapanesepagetitle
</tr>
<tr>
<td height="51" valign="top" bgcolor="#FFFFCD"><form name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<div align="left"><span class="style22">
<input name="password" type="password" class="style22" id="password" size="6">
</span> <span class="style22">
<input name="compemail" type="text" id="compemail" size="10">
</span>
<input type=IMAGE
src="submitbutton1.gif" name="submit">
</div>
</form></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="297" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="760" height="3"></td>
</tr>
<tr>
<td height="291" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="760">
<!-- fwtable fwsrc="newfrontpage1.png" fwbase="newfrontpage.jpg" fwstyle="Dreamweaver" fwdocid = "1101099143" fwnested="1" -->
<tr>
<td><img name="newfrontpage_r1_c1" src="newfront/images/newfr
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="759">
<tr>
<td><img name="newfrontpage_r1_c2" src="newfront/images/newfr
</tr>
<tr>
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="759">
<tr>
<td><a href="http://www.orangutanjapan.com/NewMemberTeacherProfile-1.php?language=&prefecture=&Submit=T?û" onMouseOut="MM_swapImgRest
<td><a href="What is OrangutanFindateacherNEW.h
<td><a href="FAQNEW.htm" onMouseOut="MM_swapImgRest
<td><a href="signup.php" onMouseOut="MM_swapImgRest
<td><a href="OrangutanJapan_Teach
<td><img name="newfrontpage_r2_c7" src="newfront/images/newfr
<td><a href="http://www.orangutanenglish.com"><img name="newfrontpage_r2_c9" src="newfront/images/newfr
<td><img name="newfrontpage_r2_c10"
<td><a href="JgetPassword.htm"><i
</tr>
</table></td>
</tr>
<tr>
<td><table align="left" border="0" cellpadding="0" cellspacing="0" width="759">
<tr>
<td><img name="newfrontpage_r3_c2" src="newfront/images/newfr
<td><img name="newfrontpage_r3_c8" src="newfront/images/newfr
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="148" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="9" height="148"> </td>
<td width="489" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF9900">
<!--DWLayoutTable-->
<tr>
<td width="340" height="148" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="340" height="148" valign="top" bgcolor="#FF9900"><div align="left"><span class="style58"><span class="style67"><span class="style17"> <spa
<span class="style62"><span class="style20"> &nbs
Looking for a teacher? - <span class="style19">Get started now</span></span><br>
</span></span><span class="style55"> &nbs
ÊYP×íÕ£üë’¯êï
HTLBj_’…cfD~Y</span></span
<br>
<span sabprocessed="1" sabchildelements="1"><span
</tr>
</table></td>
<td width="3"> </td>
<td width="148" valign="top"><img src="face1.jpg" alt="ñqìùónH" width="148" height="148"></td>
</tr>
</table></td>
<td width="10"> </td>
<td width="245" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FF6600">
<!--DWLayoutTable-->
<tr>
<td width="243" height="146" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="243" height="44" valign="top"><img src="newquicksearch1.jpg" alt="×é¤ÙüÈñqìùó" width="243" height="44"></td>
</tr>
<tr>
<td height="74" valign="top"><form name="form2" method="post" action="NewMemberTeacherPr
<table width="237" border="0">
<tr>
<td width="80"><div align="left"><img src="language.jpg" alt="ñqìùónH" width="60" height="20"></div></td>
<td width="147"><div align="left">
<select name="language" class="style28" id="language">
<option value="" <?if($area==""){print " SELECTED";}?>>hýžg </option>
<option value="English" <?if($area=="English"){pri
<option value="korean" <?if($area=="korean"){prin
<option value="Chinese" <?if($area=="Chinese"){pri
<option value="Vietnamese" <?if($area=="Vietnamese"){
<option value="Azerbaijani" <?if($area=="Azerbaijani")
<option value="Arabic" <?if($area=="Arabic"){prin
<option value="Italian" <?if($area=="Italian"){pri
<option value="Indonesia" <?if($area=="Indonesia"){p
<option value="Holland" <?if($area=="Holland"){pri
<option value="Estonia" <?if($area=="Estonia"){pri
<option value="Cambodia" <?if($area=="Cambodia"){pr
<option value="Spanish" <?if($area=="Spanish"){pri
<option value="Zulu" <?if($area=="Zulu"){print " SELECTED";}?>>ºüëüž</OPTIO
<option value="Thai" <?if($area=="Thai"){print " SELECTED";}?>>¿¤ž</OPTION>
<option value="Tagalog" <?if($area=="Tagalog"){pri
<option value="Tamil" <?if($area=="Tamil"){print
<option value="Danish" <?if($area=="Danish"){prin
<option value="Turkish" <?if($area=="Turkish"){pri
<option value="German" <?if($area=="German"){prin
<option value="Nepalese" <?if($area=="Nepalese"){pr
<option value="Hindu" <?if($area=="Hindu"){print
<option value="French" <?if($area=="French"){prin
<option value="Bulgarian" <?if($area=="Bulgarian"){p
<option value="Bengali" <?if($area=="Bengali"){pri
<option value="Portuguese" <?if($area=="Portuguese"){
<option value="Polish" <?if($area=="Polish"){prin
<option value="Myanmar" <?if($area=="Myanmar"){pri
<option value="Romanian" <?if($area=="Romanian"){pr
<option value="Russian" <?if($area=="Russian"){pri
</select>
</div></td>
</tr>
<tr>
your problem is this line:
$area = isset($_REQUEST['area'])?$ _REQUEST[' area']:""; //Default to no area, but retrieve from previous page if possible.
if the box is called location, it should be:
$area = isset($_REQUEST[location'] )?$_REQUES T['locatio n]:""; //Default to no area, but retrieve from previous page if possible.
$area = isset($_REQUEST['area'])?$
if the box is called location, it should be:
$area = isset($_REQUEST[location']
ASKER
Sorry, I understand now.
The two boxes corresponding to database fields, which a quick search would be made by, are called 'language' and 'prefecture'.
How should I modify your line of code to incorporate the two fields (language and prefecture)? The line of code for 1 field (language) is below...
<?php
$area = isset($_REQUEST['language' ])?$_REQUE ST['langua ge']:""; //Default to no language, but retrieve from previous page if possible.
?>
The two boxes corresponding to database fields, which a quick search would be made by, are called 'language' and 'prefecture'.
How should I modify your line of code to incorporate the two fields (language and prefecture)? The line of code for 1 field (language) is below...
<?php
$area = isset($_REQUEST['language'
?>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, I've discovered the problem. On my search form I had the following:
<form name="form2" method="post" action="NewMemberTeacherPr ofile-1.ph p">
and on my results page I had:
<a href="NewMemberTeacherProf ile0.php?l anguage=<? php echo $_GET['language'] ?>&prefecture=<?php echo $_GET['prefecture'] ?>&recordID=<?php echo $row_m['autonumber']; ?>" class="style45"><font size="1" face="Arial, Helvetica, sans-serif"><?php echo $row_m['firstname']; ?></font></a>
I changed 'post' to 'get' and problem solved. Many thanks fibo and basiclife for all your help! Very much appreciated. Thank you for very much.
<form name="form2" method="post" action="NewMemberTeacherPr
and on my results page I had:
<a href="NewMemberTeacherProf
I changed 'post' to 'get' and problem solved. Many thanks fibo and basiclife for all your help! Very much appreciated. Thank you for very much.
You need 1 page to display a list of results and when you click on it, you want to show details of that record? and preserve the queries across pages to re-populate search results later?
If that is the case, you need to store the search variables somewhere - either in hidden form fields + links throughout your poage or (possibly more simply) in some cookies?
If you can explain in detail what you WANT to happen, we can help you do it :)