> -----Original Message-----
> From: Steve Dodkins [mailto:[EMAIL PROTECTED]]
> Sent: 15 October 2002 14:22
> To: Php-Db (E-mail)
> 
> Hi I'm trying to print the contents of a cookie (php 4.2.3) 
> the syntax below
> is wrong but what should it be?
> 
> if ($_cookie["cookiename"]== TRUE) {
> echo"<p>your cookie is" $_COOKIE["cookiename"]"</p>";
> }

  if (isset($_COOKIE['cookiename'])) {
    echo "<p>your cookie is {$_COOKIE['cookiename']}</p>";
  }

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to