session_start(); $textfield = $_SESSION['user']; $namee = $_SESSION['shop']; $userw = strlen("$textfield"); $userw1 = strlen("$namee"); if ($userw == 0 OR $userw1 == 0) { header("Location: http://www.extrarewards.com/xindex.php"); } $word = $namee; $word1 = $namee; $connection = mysql_connect("localhost","extra_pir","splice") or die("Could not make connection."); $db = mysql_select_db("extra_pir") or die("Could not select database."); $Query1 = "SELECT * FROM contact WHERE stoid ='$textfield'"; $queryexe1 = mysql_query($Query1) or die("Invalid query: " . mysql_error()); while ($row = mysql_fetch_array($queryexe1)) { $code = $row["passcode"]; $stoid = $row["stoid"]; $first1 = $row["name"]; $curbal = $row["curbal"]; $province1 = $row["stopro"]; $postal1 = $row["stopc"]; $email = $row["email"]; $program = $row["program"]; $openbal = $row["openbal"]; $pts = $row["pts"]; $programmz = $row["program"]; } ?>