Jump to content

[SOLVED] Cookie data not displaying...


acctman

Recommended Posts

The cookie data is not being displayed in the register.html file, is there something wrong with my coding?

 

<?php

/* 

  File refer.php

  www.domain.com/refer.php?m=UserName

*/

 

$rmbuser = $_REQUEST['m'];

 

if (isset($_COOKIE["rmbreferral"]))

    header ("Location: http://www.domain.com/register.html");

else

    setcookie ("rmbreferral", $rmbuser, strtotime("+30 days")); 

    header ("Location: http://www.domain.com/register.html");

?>

 

I added this to the register.html file.

Referred By:<input type=text name=edit[ref_by] size=30 value='<? echo $_COOKIE['rmbreferral']; ?>'>

 

Link to comment
https://forums.phpfreaks.com/topic/62241-solved-cookie-data-not-displaying/
Share on other sites

i'm using a linux server editing an exisiting register.html file, i'm looking at the file now and see that its parsing php coding in other locations like this

 

<? global $countries; foreach ($countries as $key => $value) echo "<option value='".$key."' ".($en['country'] == $key ? ' selected' : '').">".htmlentities($value['name'],ENT_QUOTES)."</option>"; ?>

 

so i'm thinking is my coding correct?

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.