Forums

PHP

This topic is locked

Cookie with recordset field value

Posted 17 Nov 2001 22:55:41
1
has voted
17 Nov 2001 22:55:41 ernst gombrich posted:
Hi, I've tried to use a recordset field value as a cookie value, but nothing works (even the PHP Cookie Suite made by Tim has trouble with PHAkt's Recordset fields). Tim said, that there's a workaround, but I don't find out. Can anybody help me?

Replies

Replied 18 Nov 2001 01:47:15
18 Nov 2001 01:47:15 Tim Green replied:
Please re-download the Cookie Suite as tonight I have made the amendments and the behaviour now correctly recognises recordsets.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 18 Nov 2001 16:09:50
18 Nov 2001 16:09:50 ernst gombrich replied:
Thank you, Tim!
I'm sorry, but with the new version nothing works. Ultradev has trouble with undefined TextFields in the htm-files (JavaScript errors). So I've turned back to the older version. And I found the error! It's a silly one. But I had tomatoes on my eyes for some days. It's no problem with the recordset fields, but only a typo error:
You have this:
&lt;?php
# PHP Set Cookie - Recordset Field Value v1.0
# Copyright (c)2001. Tim Green.
$tgtime_test="";
if ($tg_time_test="" { // ERROR!!!
$tg_time_test="3600";
}
$cookie_test_value=$Recordset1-&gt;Fields("topic";
setcookie("test",$cookie_test_value,time()+$tg_time_test,"/","",0);
?&gt;
It must be of course:
if ($tg_time_test=="" { // AND NOT: = !!!
This way the cookie suite works.
Only thing, which cannot be done, is setting cookies with submitted form elements (the xml file is missing). But I didn't need that so far.
Greetings,
Ernst

Replied 19 Nov 2001 10:55:05
19 Nov 2001 10:55:05 Tim Green replied:
I will resolve the issue with the missing XML file and the typo ASAP.

Thanks for letting me know.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic