Hi All,
I have been working for 2 days on a simple script. I even find it hard to
believe that I cannot figure this out, so I am turning to the community to
try and find an answer. First, some code (all from the same script):
$region = mysql_fetch_array ($template_res);
foreach ($region as $name => $value) {
$r_name = str_replace("", "", $name);
$tmpl->$r_name = $value;
$SESSION[$r_name] = $value;
}
This piece loads all the database variables that I pulled out into sessions.
I am using:
foreach ($_SESSION as $name => $value) {
echo "$name => $value<br>";
}
to see an output of what I just created.
I get:
0 => NEVD
region => NEVD
1 => Nevada Bell
brandname => Nevada Bell
2 => SBC Nevada Bell
sbcbrandname => SBC Nevada Bell
3 => nevbell
imgbrand => nevbell
4 => http://www.nevadabell.com/
siteaddress => http://www.nevadabell.com/
5 => Copyright_PrivacyPolicy/0,,113,00.html
privacy1 => Copyright_PrivacyPolicy/0,,113,00.html
6 => Copyright_PrivacyPolicy/0,,114,00.html
privacy2 => Copyright_PrivacyPolicy/0,,114,00.html
7 => C2002 Nevada Bell
Telephone Company
companylabel => C2002 Nevada Bell
Telephone Company
8 =>
ebilllink =>
I do not know where the 0-8 items are from. I have 'session_start ();' at
the top of each script. When I do a submit to go to step 2, it looses all
the session values. Here is the code for submission:
echo '
<form action=index.php>
<input type=hidden name=step value=2>
<input type=submit value=submit>
</form>
';
Simple html.
I am completely stumped. I have been all over php.net, the archives, and
phpbuilder.com. I cannot find any answer to what I am doing wrong. When I
hit submit, it comes up, and $_SESSION is empty. Any advice will be greatly
appreciated...
Using Version 4.1.2...
-Dan Joseph :o