PDA

View Full Version : Mod DW Server Behaviors


Bike Racer
04-23-2008, 09:46 PM
I been given this path to use as storage for global variable by my host.

session_save_path(MY_Path_goes_here);
session_start();

In order to get a simple "search and result" page using DW server behaviors, I think I might have to use this path somewhere in the php code in order to pass the search info onto the results page.

here is the code from the search page generated by DW.

<?php require_once("Connections/testserver.php");

$currentPage = $_SERVER["PHP_SELF"];

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?>

and by the results page.

<?php require_once("Connections/testserver.php"); ?>

<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":.......................etc.


Is it possible to add the path to this code? Where?

davidj
04-24-2008, 09:09 PM
can i tempt you into learning to code.

you will be so much more free to build nice things

follow the link in my signature to enlightenment