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 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
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
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 {
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
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
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
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" &
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
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
";
}
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/
://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
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
13 matches
Mail list logo