# Header("Set-cookie:

**URL:** https://forum.kirupa.com/t/header-set-cookie/156553
**Category:** programming
**Created:** [July 26, 2005, 4:50pm UTC](https://forum.kirupa.com/t/header-set-cookie/156553 "2005-07-26T16:50:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Zaid\_W1red](https://avatars.discourse-cdn.com/v4/letter/z/cab0a1/32.png) [@Zaid\_W1red](https://forum.kirupa.com/u/Zaid_W1red)
#### Post date: [July 26, 2005, 4:50pm UTC](https://forum.kirupa.com/t/header-set-cookie/156553/1 "2005-07-26T16:50:52Z")

</div>

High.

Ive successfuly built the flash/php/mysql login script on [kirupa.com](http://kirupa.com) but i want to take it further and have the PHP script set a cookie.

I tried using plain old setcookie with no success and found the ‘Header(setcookie’ version…only problem is i dont know if im getting the syntax right!

Heres what ive tried so far:

Header(“Set-cookie: w1redpass = $useremail.’|’.$md5pass.’|’.$cookTime, time()+60_60_24\*100, ‘/’, ‘[zaidcrowe.co.uk](http://zaidcrowe.co.uk)’, 0”);

…basically trying to convert this:

setcookie(‘w1redname’, $username.’|’.$id, time()+60_60_24\*100, ‘/’, ‘[zaidcrowe.co.uk](http://zaidcrowe.co.uk)’, 0);

Hope this makes sence!

Thansk for your time!
