Jump to content

saving variables in cookies


edwardda

Recommended Posts

Hello all wondering if someone can help > I’m fairly new to php and while work on a training I ran into the following problem>> in trying to write code to capture the values 'first name' and 'last name' in cookies  the code im using is

  

<?php

setcookie('firstName', $_GET['firstName'], time() + (60*60*24));

setcookie('lastName', $_GET['lastName'], time() + (60*60*24));

?>

 

 

Can any tell me what I’m doing wrong so confused

 

 

Link to comment
https://forums.phpfreaks.com/topic/277025-saving-variables-in-cookies/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.