session problem
am 10.08.2002 22:26:37 von Ricky
Hello everybody I'd like to make a page in which the results shown can
be bookmarked by pressing a button.
Actually first it checks if the session is open already ... Then it
should check if the result (that comes from a query to a MySQL table)
has been registered already, finally it registers all the variables in a
multidimensional array.
this is the code:
session_start();
if(!session_is_registered("bkmks"))
{session_register("bkmks")||die("WE GOT PROBLEMS MAN");
$bkmks = array(array(tab=>$tab, id=>$id, url=>$url, nome=>$nome,
ind=>$ind, com=>$com, pv=>$pv, tel=>$tel, chi=>$chi));
print "
Your choice has been stored";
}
else
{
foreach($bkmks as $v)
{
if(($v[tab]==$tab)&&($v[id]==$id)){print "
chosen this item";exit;
}
}
$bkmks[][tab]=$tab;
$bkmks[][id]=$id;
$bkmks[][url]=$url;
$bkmks[][nome]=$nome;
$bkmks[][ind]=$ind;
$bkmks[][com]=$com;
$bkmks[][pv]=$pv;
$bkmks[][tel]=$tel;
$bkmks[][chi]=$chi;
print "Your choice has been stored";
}
It doesn't work! I can't figure out why.
It starts storing fine and then it seems messing up with values so it
recognises as already stored only the variables of my first choice (the
value stored at bkmks[0])... I tried to print values stored in the
array: the output is a mess I don't know why!
Thanks a lot !
Bye.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: session problem
am 23.07.2003 12:12:39 von JDillon
This is advertising a porno site.
-----Original Message-----
From: tana dsasa [mailto:norbertnet2003@yahoo.co.uk]
Sent: 23 July 2003 11:11
To: php-db@lists.php.net
Subject: [PHP-DB] session problem
I have installed an user-login aplication on my website (=20
http://www.norbertnet.ro ) but i have problems with session controls.
I receive all kinds of warnings and i don't know how to interpret them
=20
thanks advanced
---------------------------------
Want to chat instantly with your online friends?=A0Get the FREE
Yahoo!Messenger
=A0=
http:/ /www.cantor.com
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, =
are confidential. If you are not the named recipient please notify the send=
er and immediately delete it. You may not disseminate, distribute, or forwa=
rd this e-mail message or disclose its contents to anybody else. Copyright =
and any other intellectual property rights in its contents are the sole pro=
perty of Cantor Fitzgerald.
E-mail transmission cannot be guaranteed to be secure or error-free. T=
he sender therefore does not accept liability for any errors or omissions i=
n the contents of this message which arise as a result of e-mail transmissi=
on. If verification is required please request a hard-copy version.
Although we routinely screen for viruses, addressees should check this=
e-mail and any attachments for viruses. We make no representation or warra=
nty as to the absence of viruses in this e-mail or any attachments. Please =
note that to ensure regulatory compliance and for the protection of our cus=
tomers and business, we may monitor and read e-mails sent to and from our s=
erver(s).=20
For further important information, please read the Important Legal Informa=
tion and Legal Statement at http://www.cantor.com/legal_information.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Session Problem
am 17.01.2007 04:01:19 von jusa_98
--0-1311133591-1169002879=:77872
Content-Type: text/plain; charset=ascii
Content-Transfer-Encoding: quoted-printable
=0A> Forget to tell you, that if I used http://localhost
lhost/>=0A> , the session running well...=0A>=0A> But if I change with http=
://hostname , the session=0A> wasn't running...=0A>=0A<=
/snip>
http://localhost and http://hostname/ are 2 COMPLETELY differen=
t things and can reflect NOTHING to do with privlidges. However if localho=
st works and hostname does not and hostname hits back to your machine than =
you have a problem more likely with your module. I think 5.2 had the issue=
s with directives handling sessions. Update your PHP now, never use an old=
er version. NEVER! You should never use an older version of anything =
net related in my opinion. Your crazy if you do, your inline to be attacke=
d if so and your also in line to have problems like this that are generally=
out dated because the newer release normally fixes common errors.
It'=
s like contacting Microsoft for help on Windows 98 now, they won't offer an=
y. Same applies here, update all your modules and the problem will more li=
kely be fixed and people will be even more happier to help you.
It's h=
ard to help someone if I have installed a different version than you. But =
can you do an update?
Sessions can be so tricky at times, even if you =
think you have it all right they seem to always give you grief.
Goodlu=
ck with it.
J
--0-1311133591-1169002879=:77872--