PDA

View Full Version : cookies problem


dawilis
12-15-2002, 02:11 PM
I have this page utilising some cookie code that I cant seem to get working, Id appreciate your help with this, please
The first page gathers the info and stores it, (this works) the second page should retrieve some of the data and and display it, but it wont work

page 1
http://www.instantmoneymaker.com.au/orderdetails.html

page 2
http://www.instantmoneymaker.com.au/payment.html

whammy
12-16-2002, 05:21 AM
Your cookie stored my information... but it looks like you have a lot of unnecessary script on your second page... this script works for me, I modified the formatting a little bit but left the appropriate credits in as far as I know:

<script type="text/javascript">
<!--
//
// Get cookie routine by Shelley Powers
//
function get_cookie(cookiename) {
var search = cookiename + "="
var cookievalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search);
// if cookie exists
if (offset != -1) {
offset += search.length;
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1) {
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end));
}
}
return cookievalue;
}
//-->
</script>


Hope this helps... :)

dawilis
12-16-2002, 01:52 PM
Hi all (whammy)
I have deviated from the original track and am faced with another problem along the same lines of this thread.
I have this original form that needs to be emailed but there is a conflict with formmail.pl and the post method in the form statment
formmal requirs the post method, however the cookie requires the get method to update and display the contents, any ideas here please

profile page
http://www.instantmoneymaker.com.au/orderdetails.html

payment page
http://www.instantmoneymaker.com.au/payment.html