help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Procedures and functions] Reference for unit 'pwumain' (#powtils_main)

UnsetCookie

Declaration

Source position: pwumain.pas line 89

function UnsetCookie(

  const name: String

):Boolean;

Notes

Unsets a cookie which has been set with SetCookie. If output_buffering is disabled in the config file, this call is valid only before any output calls (webwrite, webwriteln)

The function returns TRUE on success, FALSE on error.

Example

Assuming you have set the cookie 'foo' in another web program instance, the below demo will unset it.
begin
  UnsetCookie('foo');
  webwrite('Does the cookie still exist: ');
  s := GetCookie('foo');
  if s = '' then webwrite('no') else webwrite('yes');
end.





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505