Ask a Question related to PHP Development, Design and Development.
-
Jakob Rohde #1
How to use session variable
Hi,
Total PHP newbie here.
I'm trying to use PHP 4.3.6 in Dreamweaver MX, and I want to make a login
form that has a drop down. The value that the user selects prior to hitting
the submit button, should be saved in a session variable, and displayed on
the following pages.
Could someone please explain in a simple manner (if that is possible) how I
can acheive that using Dreamweaver?
TIA,
Jakob
Jakob Rohde Guest
-
#39634 [NEW]: session variable and normal variable
From: erhanbaris at gmail dot com Operating system: Win Xp SP1 PHP version: 5.2.0 PHP Bug Type: Variables related Bug... -
session variable and IE
Hi there, I have a session variable that holds an user name, after user logs in. All works just fine in development environment (Intranet) for IE... -
Session Variable in IIS 5
Hi, i can't use a Session variable in IIS 5, when i try to assign a value send to me next erro messages "Microsoft VBScript runtime (0x800A000D)... -
Datalist - how (if) to use a sub variable or session variable in the footer?
Hi, sorry to be greedy with all my posts lately, but can you tell I'm doing new things this week? I've just done my first datalist (a simple... -
[SESSION] Session variable deleted prior to command?
Hi all, I'm developing a database system on my local computer (OS/version details at bottom) with a simple user authentication using sessions. On... -
Janwillem Borleffs #2
Re: How to use session variable
Jakob Rohde wrote:
I have no experience with DW, but here's an example:> I'm trying to use PHP 4.3.6 in Dreamweaver MX, and I want to make a
> login form that has a drop down. The value that the user selects
> prior to hitting the submit button, should be saved in a session
> variable, and displayed on the following pages.
>
> Could someone please explain in a simple manner (if that is possible)
> how I can acheive that using Dreamweaver?
>
<?
if (isset($_POST['choice'])) {
// Start session support
session_start();
// Set the session var
$_SESSION['choice'] = $_POST['choice'];
// Redirect to a following page
header("Location: next.php");
}
?>
<form method="post">
<select name="choice">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
<input type="submit" />
</form>
And on next.php:
<?
session_start();
$choice = $_SESSION['choice'];
// etcetera...
?>
JW
Janwillem Borleffs Guest
-
Breaker One #3
Re: How to use session variable
Jakob Rohde wrote:
I don't know what the stance is on linking webpages in this newsgroup so> Hi,
>
> Total PHP newbie here.
>
> I'm trying to use PHP 4.3.6 in Dreamweaver MX, and I want to make a login
> form that has a drop down. The value that the user selects prior to hitting
> the submit button, should be saved in a session variable, and displayed on
> the following pages.
>
> Could someone please explain in a simple manner (if that is possible) how I
> can acheive that using Dreamweaver?
>
> TIA,
>
> Jakob
>
>
I'm sorry if it's against the rules. Here is a link to a pretty decent
Session intro.
[url]http://www.phpfreaks.com/tutorials/41/0.php[/url]
Breaker One Guest



Reply With Quote

