0
Creating a session variable with PHP
Community Beginner
,
/t5/dreamweaver-discussions/creating-a-session-variable-with-php/td-p/109196
Sep 22, 2008
Sep 22, 2008
Copy link to clipboard
Copied
Can anyone offer me a PHP script that creates a session
variable? The Dreamweaver CS3 Help documentation offers coding
samples for ColdFusion and ASP but not for PHP. I tried this
without success:
"$_SESSION['usermail']= $_POST['sub_email'];" in which I am trying to capture an email address from a form and save it to use in a confirmation email to a new subscriber. Any help would be sincerely appreciated.
najrellim@gmail.com
"$_SESSION['usermail']= $_POST['sub_email'];" in which I am trying to capture an email address from a form and save it to use in a confirmation email to a new subscriber. Any help would be sincerely appreciated.
najrellim@gmail.com
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/creating-a-session-variable-with-php/m-p/109197#M135061
Sep 22, 2008
Sep 22, 2008
Copy link to clipboard
Copied
I use this -
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
at the top of the page, and then this within the code block where you are
processing the form's data -
$_SESSION['usermail']= $_POST['sub_email'];
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================
"Jugdish" <webforumsuser@macromedia.com> wrote in message
news:gb8aov$691$1@forums.macromedia.com...
> Can anyone offer me a PHP script that creates a session variable? The
> Dreamweaver CS3 Help documentation offers coding samples for ColdFusion
> and ASP
> but not for PHP. I tried this without success:
> "$_SESSION['usermail']= $_POST['sub_email'];" in which I am trying to
> capture
> an email address from a form and save it to use in a confirmation email to
> a
> new subscriber. Any help would be sincerely appreciated.
> najrellim@gmail.com
>
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
at the top of the page, and then this within the code block where you are
processing the form's data -
$_SESSION['usermail']= $_POST['sub_email'];
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================
"Jugdish" <webforumsuser@macromedia.com> wrote in message
news:gb8aov$691$1@forums.macromedia.com...
> Can anyone offer me a PHP script that creates a session variable? The
> Dreamweaver CS3 Help documentation offers coding samples for ColdFusion
> and ASP
> but not for PHP. I tried this without success:
> "$_SESSION['usermail']= $_POST['sub_email'];" in which I am trying to
> capture
> an email address from a form and save it to use in a confirmation email to
> a
> new subscriber. Any help would be sincerely appreciated.
> najrellim@gmail.com
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

