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: I

[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

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

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 you

[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

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 this.

[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: [PHP] Help with session variables

2002-12-04 Thread Stephen
. 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 [EMAIL PROTECTED] Sent: Wednesday, December 04, 2002 1:12 AM Subject: [PHP] Help with session

[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;

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);

[PHP] help with session variables

2002-11-28 Thread Thomas Goeminne
? include ('./header.php'); $query=select prodid, title FROM fatbeats_prod; $result= mysql_query($query); $names= mysql_fetch_assoc($result); $query1=select prodid, price from fatbeats_prod; $result1=mysql_query($query1); $prices= mysql_fetch_assoc($result1); while (list($key,$val) =

[PHP] Help on Session and cockies

2002-06-06 Thread Marcos Lois Bermúdez
A have two webs made in php, both uses a authentication based on session suport. I use in every page a session_start(); and a session_name( name); to get different name for the sessions but when i get login i one web, and then go to the other i get the same login. what happend? What means the

[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"