Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetCookie Issue.. Only part of the variable returning.

Status
Not open for further replies.

wraygun

Programmer
Dec 9, 2001
272
0
0
US
Hi there,

I've searched the forums here, but I can't seem to find what I'm looking for (or I'm overlooking it).

I'm using the following to set a cookie(working fine):

Code:
 value = <?php echo $bandname; ?>

And I'm using the following to retreive the data(also working partially):

Code:
//Look for cookies and set variable.
if(isset($_COOKIE['bandname']))
$bandname = $_COOKIE['bandname']; 
else
$bandname = ""

If I submit a 'bandname' (coming from an HTML form), of one word (i.e. Happy, U2, REM, etc...) it works fine, but if the 'bandname' contains more than one word (i.e. Depeche Mode, They Might Be Giants, etc...), it only returns the first word of the string(In this case, Depeche, and They). Any tips or pointer would be greatly appreciated.

Thanks a bunch,
Harold

***You can't change your past, but you can change your future***
 
Hi there,

I got it worked out...not sure why it worked, but I changed the textfields to multiline and back to singleline and everything started working. Go figure...

Thanks a bunch,
Harold

***You can't change your past, but you can change your future***
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top