Skip to content

Instantly share code, notes, and snippets.

@Goldenflamer
Goldenflamer / setcookie.php
Created October 26, 2019 20:43
Set a cookie via a php script by using input fields
<form action="<?php print($_SERVER['PHP_SELF']);?>" method="post">
<p>Cookie-Name<input type="text" name="name" /></p>
<p>Cookie-Value<input type="text" name="value" /></p>
<p><input type="submit" /></p>
</form>
<?php
if(isset($_POST['name']) && isset($_POST['value']))
{