Validation and session variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I guess my resolution was a fluke.
Recap: Adding validation kills my session variables
Now I tested a few things, SID is consistent across
pages, so a new sid and cookie are not being
generated.

Perhaps it's a bug, Im on PHP 4.3.8 

Here is the code again, perhaps something will jump
out.

<?php

//Start the Session - begin Block
@session_start();
header("Cache-control: private");

//Connection statement
require_once('Connections/xxxxx.php');

//Aditional Functions
require_once('includes/functions.inc.php');

//load the tNG classes
require_once('tNG/KT_tNG.inc.php');



restrictAccessToPage($xxxx,'xxxxx','AccessDenied.php','SignUp','SignUpID','Username','password','level',false,array("xxxx"));

?>
<?php
require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php");
?>
<?php
require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php");
?>
<?php 
if (isset($_POST["Submit"]))  {
  $WAFV_Redirect = "";
  $_SESSION['WAVT_page1'] = "";
  if ($WAFV_Redirect == "")  {
    $WAFV_Redirect = $_SERVER["SCRIPT_NAME"];
  }
  $WAFV_Errors = "";
  $WAFV_Errors .=
WAValidateAN(((isset($_POST["ListingName"]))?$_POST["ListingName"]:"")
. "",true,true,true,true,"",true,1);
  $WAFV_Errors .=
WAValidatePN(((isset($_POST["AltP1"]))?$_POST["AltP1"]:"")
. "",false,false,false,2);
  $WAFV_Errors .=
WAValidatePN(((isset($_POST["AltP2"]))?$_POST["AltP2"]:"")
. "",false,false,false,3);
  $WAFV_Errors .=
WAValidatePN(((isset($_POST["Pgr"]))?$_POST["Pgr"]:"")
. "",false,false,false,4);
  $WAFV_Errors .=
WAValidateEM(((isset($_POST["El2"]))?$_POST["El2"]:"")
. "",false,5);
  $WAFV_Errors .=
WAValidateEM(((isset($_POST["El3"]))?$_POST["El3"]:"")
. "",false,6);

  if ($WAFV_Errors != "")  {
    PostResult($WAFV_Redirect,$WAFV_Errors,"page1");
  }
}
?>
<?php


if ($_SERVER["REQUEST_METHOD"] == "POST") {
Header ('Location:
http://www.xxxxxx.com/page2.php?'.SID);

}
?>

I just set an echo on page2 and page3 of the first
session variable 'listingname'.  If I have the
validation code in page1 , it doesn't even make it to
page2

I'm really sorry for posting this again.  Maybe it's a
bug or I'm posting my variables wrong or ....

Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux