Re: [PHP] help with session

2007-08-31 Thread Dan
You should be sanatizing code here. When you save it to the session and when it's output. Look arround the newsgroups or online for info about it, it's everywhere. - Dan "mike" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On 8/26/07, Jason Cartledge <[EMAIL PROTECTED]> wrote

Re: [PHP] help with session

2007-08-26 Thread Wouter van Vliet / Interpotential
I would go for: if (isset($_REQUEST['gender'])) $_SESSION['registrationGender'] = $_REQUEST['gender']; print isset($_SESSION['registrationGender']) ? "You are registered as gender: ".$_SESSION['registrationGender'] : "Your gender is unknown"; And make no assumptions about a gender when yo

Re: [PHP] help with session

2007-08-26 Thread mike
On 8/26/07, Jason Cartledge <[EMAIL PROTECTED]> wrote: I would replace $_REQUEST with $_GET or $_POST (as appropriate) > if ( !empty($_REQUEST['gender']) ) > { >$registrationGender=$_REQUEST['gender']; > } > else { Personally I would use if(isset($_SESSIO

[PHP] help with session

2007-08-26 Thread Jason Cartledge
Hi, this is my first post to this newsgroup. Does this code look ok or is there a more clean way of doing this? I am learning. Thank you for reading. Jason if ( !empty($_REQUEST['gender']) ) { $registrationGender=$_REQUEST['gender']; } else {

Re: [PHP] Help with session needed

2003-03-09 Thread Jack
On Sun, 9 Mar 2003 21:18:33 +0100 "Øystein Håland" <[EMAIL PROTECTED]> wrote: > The problem is the cookie soon reaches the 4 kb limit, so I would like to > achieve the same using session. The trouble is, I don't know how to do. I > would appreciate any help that brings me closer to a solution on t

[PHP] Help with session needed

2003-03-09 Thread Øystein Håland
Today I collect information from several forms and store it in a cookie: function formCookie() { var cookieValue = document.$formName.totalAns.value+'|'; cookieValue +=document.form1.correct.value+'$test[1]'+document.form1.question1.value+doc ument.form1.answer.value+'|'; cookieValue +=document

[PHP] Help with session needed

2003-02-21 Thread Øystein Håland
I use cookies in my web applications, but have reached the 4 kB limit. So I need to 'convert' all my cookies to session variables. Have got an idea how I can create such for one variable, but here I have multi element cookies. Reading the php manual gives me no idea on how to do this. Here's the re

Re: [PHP] Help with session variables

2002-12-04 Thread Stephen
er("Location: page_B.php"); Page B. session_start(); echo $HTTP_SESSION_VARS['step']; // You can echo it out straight, don't need to extract it Hope it works! - Original Message - From: "Manuel Ochoa" <[EMAIL PROTECTED]> To: "PHP General" &

Re: [PHP] Help with session variables

2002-12-03 Thread Jason Wong
On Wednesday 04 December 2002 14:12, Manuel Ochoa wrote: > I'm running PHP 4.3 on a Windows .net server with Apache 2. Please look at > the following code as I cannot figure out what I'm doing wrong. > > Page1. > session_start(); > session_register("step"); > $step=1; > header("location: page_A

[PHP] Help with session variables

2002-12-03 Thread Manuel Ochoa
I'm running PHP 4.3 on a Windows .net server with Apache 2. Please look at the following code as I cannot figure out what I'm doing wrong. Page1. session_start(); session_register("step"); $step=1; header("location: page_A.php"); Page_A. session_start(); extract($_SESSION); $step=2; hea

[PHP] help with session variables

2002-11-28 Thread Thomas Goeminne
"; } include ('./footer.php'); ?> What i need is to declare the arrays $names and $prices And select the prodid as key and the title as val how can I do this? I tried "select prodid as key, title as val but that doesnt work. thx for any help -- PHP General Mailing List (http://www.php.net/

Re: [PHP] Help with session

2001-02-15 Thread Richard Lynch
://chatmusic.com/volunteer.htm - Original Message - From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, February 15, 2001 11:36 AM Subject: [PHP] Help with session > I have 2 functions on my page, RegisterUser, IsValidUser. > RegisterUser looks

[PHP] Help with session

2001-02-15 Thread Karl J. Stubsjoen
I have 2 functions on my page, RegisterUser, IsValidUser. RegisterUser looks in the querystring to see if you've passed a certain key & value. If you have it populates a session variable called "ValidUser" with a 1. All that IsValidUser does, is check to see if the session variable "ValidUser" i