/    Sign up×
Community /Pin to ProfileBookmark

problem updating session variables

I have 3 pages, each with forms; all in the same domain. The data from the first page passes to the 2nd and 3rd ok {First, Last, Addr, City}. On the 2nd I create the session variables:
<?php
session_start();
session_destroy();
session_register(“sessFirst”);
session_register(“sessLast”);
session_register(“sessAddr”);
session_register(“sessCity”);
session_register(“sessApplSex”);
session_register(“sessCounty”);
$sessFirst = $HTTP_POST_VARS[‘First’];
$sessLast = $HTTP_POST_VARS[‘Last’];
$sessAddr = $HTTP_POST_VARS[‘Addr’];
$sessCity = $HTTP_POST_VARS[‘City’];
$sessApplSex = $_POST[‘Appl_Sex’];
$sessCounty = $_
POST[‘County’];
?>
<%@LANGUAGE=”JAVASCRIPT” CODEPAGE=”1252″%>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
……………….

The form on page 2 has two additional fields, County and Appl_Sex {= a radio button} whose values I would like to pass to page3.

Here’s some snippets:

……………
<td >
<input name=”Appl_Sex” id=”App_Male” class=”req” type=”radio” value=”Male” tabindex=”20″/><label> Male </label>
<input type=”radio” name=”Appl_Sex” id=”App_Female” class=”req” value=”Female” tabindex=”21″ /><label > Female </label>
</td>
………………
<form action=”http://www.insurance.com/ wexxx.php” method=”post” enctype=”multipart/form-data” name=”quote_form” id=”quote_form” >
…………………..

On page 3, value=”<?php echo $_POST[‘Appl_Sex’]; ?>” /> and value=”<?php echo $sessCounty; ?>” /> both produce value = “”.

Any clues how to solve???

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@littlenedJul 19.2007 — try

$_SESSION['sessCity'] = 'whatever';
Copy linkTweet thisAlerts:
@jalea148authorJul 19.2007 — I don't understand your suggestion {$_SESSION['sessCity'] = 'whatever';} City is passed from page 1 to pages 2 and 3 without any difficulty. I did try initializing sessCounty with 'xxx' on page2 - this value passed to page 3 ok - however, on the form on page 2, County was updated and the new value did not go to page 3.
×

Success!

Help @jalea148 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...