Hi Nick,
to delete a cookie, simply use set_cookie("cookie_name"); without appending
any values.
Possible solutions for the \t and \n :
For \n to <br>, use:
$string = nl2br($string);
Not sure whether or not there a similar function for \t, though you could
perhaps use some method to replace \t with * 4. I'm not sure
something like:
$string = ereg_replace("\t", " ", $string);
would be too clever, just in case someone typed \t rather than ereg_replace
/ preg_replace recognising it as a Tab.
It's getting too late to do any serious thinking. :)
James.
""Nick"" <[EMAIL PROTECTED]> wrote in message
005601c0d275$bfc88510$4c8d7018@cr279859a">news:005601c0d275$bfc88510$4c8d7018@cr279859a...
Hello PHP'ers
I am having a problem with string delimiters. For some reason no matter what
I do I can not get them to process correctly!!
For example,
<?
$area_entered = "yes";
$date_entered = "no";
echo "$area_entered\t\t\t$date_entered<br>";
?>
That outputs:
yes no
What am I doing wrong?! Is there something I need to set in the php.ini
file? I would like to be able to type \n instead of <br> repeatidly!
Also, when working with cookies, if I have a cookie that is set by,
if (!isset($cookies)) {
//Set Cookies
$cookie_user = setcookie ("username", $row["user"], time()+86400, "/",
"localhost");
$cookie_pass = setcookie ("password", $row["pass"], time()+86400, "/",
"localhost");
$cookie_step = setcookie ("step", "1", time()+86400, "/", "localhost");
$cookies_set = setcookie ("cookies", "y", time()+86400, "/", "localhost");
}
Is there a way to unset the cookie? Perhaps by,
$cookie_set = setcookie ("cookies","");
?
Thanks for your time,
Nick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]