During development (debugging) the site works well but when I release from the debugging and test into production.. the result from PHP file was not displayed.
test.php
[PHP]<a href="proshops01test.php?mode=kensaku&shopname=ロズビ ン&rowsperpage=5&pageidx=1" >test</a>[/PHP]
proshops01test.php
[PHP]<?php
header('Content-Type: text/html; charset=shift_jis');
require_once('../phpbase.php');
include(WORKINGCLASSES .'clssearchindex.php');
session_start();
$mode = $_GET['mode'];
$shopname = iconv("UTF-8", "SJIS", $_GET['shopname']);
$kensakukekka = "";
$rowsperpage = $_GET['rowsperpage'];
$pageidx = $_GET['pageidx'];
$sql = "";
$sql = "SELECT
distinct sh.shopcd,sh.name,sh.postcode, sh.areanum, sh.othernum
,pc.ken, pc.shi, pc.ku, pc.machi
FROM
shopcontacts sc LEFT JOIN shops sh
ON sc.shopcd = sh.shopcd
LEFT JOIN postcodes as pc
ON sh.postcode = pc.postcode
WHERE sh.name like '%". $shopname ."%'";
// created dbconnection
$c_rs = new Recordset();
// fetch all data based on the criteria
$_SESSION['$o_search'] = $c_rs->query($sql);
// get the data tobe displayed based on the rowsperpage
$rows = getDataPage($rowsperpage, $pageidx);
if ( count($rows) > 0 ) {
// create the list with <a> tag for hyperlink
foreach ($rows as $row){
$kensakukekka = $kensakukekka ."<a id='hyouji' name='hyouji'\n";
$kensakukekka = $kensakukekka ."href=\"\" />\n";
$kensakukekka = $kensakukekka . $row['name'] . "</a><br/>\n";
$kensakukekka = $kensakukekka ."<small>〒". $row['postcode'] ."</small><br/><br/>\n";
}
$_SESSION['kensakukekka'] = $kensakukekka;
// generate the HTML code
print $_SESSION['kensakukekka'];
}else {
$eof = false;
}
function getDataPage($limit = 5, &$idx = 1) {
$getDataPage = new ArrayObject();
$rows = $_SESSION['$o_search'];
if ( $limit > count($rows) ) {
$limit = count($rows);
$idx = 1;
}
$rowcount = 0;
for ($start = 0; $rowcount < $limit; $start++) {
if ( ! isset($rows[$start]) ) {
break;
}
if ( count($getDataPage) == 0 ) {
$getDataPage = array(0 => $rows[$start]);
}else {
array_push($getDataPage,$rows[$start]);
}
$rowcount = $rowcount + 1;
}
return $getDataPage;
}
?>[/PHP]