| | #1 |
| Active Warrior War Room Member Join Date: 2010
Posts: 97
Thanks: 17
Thanked 0 Times in 0 Posts
|
Hello, I'm trying set cookies for dynamic features. I've been able to get the on page code right that allows me to insert all dynamic features using a custom url string. i.e. http://mysites.com/dynamicpage.php?RA_kw=Keyword- keyword&RA_survey_id=survey_id&RA_id=123&RA_img=im gname As long as ALL variables are present in the incoming url cookie for each variable sets fine. Upon return visits, user is shown all dynamic cookied features. Problem 1: If ALL the php variables are NOT present in the url, cookie doesn't set on individual basis. i.e. http://mysites.com/dynamicpage.php?RA_kw=Keyword-keyword Here's the php code: PHP Code: |
| |
| | #2 |
| HyperActive Warrior War Room Member Join Date: 2009 Location: Living between LA & SD
Posts: 205
Thanks: 27
Thanked 36 Times in 33 Posts
|
Not certain what you want to happen. The reason the variables are not being set is because you are referencing something that isn't there. How can the code $_GET['RA_kw'] from the url when it doesn't exist? |
| |
| | #3 |
| HyperActive Warrior War Room Member Join Date: 2012
Posts: 290
Thanks: 13
Thanked 46 Times in 46 Posts
|
If the data is missing you will need a custom 404 page and let the user know the link cannot be processed as given.
|
| | |
| |
| | #4 |
| Warrior Member Join Date: 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
I think we are missing the point. The problem is that it should set some of the variables if they exist. Try showing error/notices and put a die/exit to see the message. It maybe after checking one variable the code crashes. |
|
Web Applications Developer MWD | |
| |
|
| Bookmarks |
| Tags |
| cookie, dynamic, insertion, php |
| Thread Tools | Search this Thread |
| |