Hi Mark, I hope things are going well. I have been trying to figure out this session thing. I downloaded and installed the plugin you recommended, but I’m not really sure how to implement it. Any advice would be greatly appreciated.
I’m receiving a piece of data called “dcode” from the following PHP script. I would like to create a session on all pages to insure that this variable is passed from page to page.
I’m not even sure where to place the plugin code, do templates need to have PHP enabled, etc.
<?php
$found = "0";
if (isset($_GET['dcode'])) {
$convention_credit = "";
$dcode = $_GET["dcode"];
mysql_connect("IP Address", "my password", "database name") or die(mysql_error());
mysql_select_db("my password") or die(mysql_error());
$query_string1 = "SELECT dealerkey, convcredits FROM `convcredits` WHERE dealerkey = '" . trim($dcode) . "' LIMIT 1";
$result = mysql_query($query_string1) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
$found = "1";
// echo "ConvCreditTotal: ";
// echo $row['convcredits'];
$cctotal = $row['convcredits'];
}
}
if ( $found == 1 ) {
echo "Convention Credit Total:<h1> " . $cctotal . "</h1>";
}
else {
echo "You are not a dealer";
}
?>
Thanks again mark