close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

display cookie on a form field

Thread began 8/20/2009 6:39 am by john.cummins125554 | Last modified 8/24/2009 9:20 pm by Eric Mittman | 2531 views | 4 replies |

john.cummins125554

display cookie on a form field

I'm trying to display a username (email address) in a 'sign-in' form.

the first time someone enters their username and password, the username is saved to a cookie. (this works)

the next time I want to display the stored username data in the textfield. I've set the 'inital value' to be the cookie, but nothing is displayed!?

I can display the cookie data, not in the text field, and this shows that the data has been stored.

Any ideas on how I get the cookie data to display in a text filed?

Sign in to reply to this post

Eric Mittman

You can display a cookie for the value of a form element like this:

<input name="text1" type="text" id="text1" value="<?php echo((isset($_COOKIE["my_new_cook"]))?$_COOKIE["my_new_cook"]:"") ?>" />

To do this I just selected the form element in design view and using the bindings panel I just inserted the cookie value. This of course will not display if the cookie is not set. If you have any further problems with this please post back with a URL and any steps needed to get the cookie set and displayed.

Sign in to reply to this post

john.cummins125554

the page is asp, not php, here's the link...
SignIn.asp


you'll notice below the form "", this is where the cookie is displayed (as text) when it has been written. I've used the same code to display the cookie in the eMail text box

this is the code I've used
<input name="txtSIGN" type="text" class="LogInTEXT" id="txtSIGN" value="<%=cStr(Request.Cookies("DSemail"))%>" size="40">

Sign in to reply to this post

DMCKIB339504

Missing Secure Attribute in an Encrypted Session (SSL) Cookie

Cookie Toolkit cannot secure cookie in SSL

Sign in to reply to this post

Eric Mittman

@John, I have opened a ticket for you on this so that we can check your pages to help determine why you are not able to populate the field with the cookie value.

for DMCKIB, please explain a little bit more about what you are experiencing here.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...