
January 3rd, 2013, 07:32 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 1
Time spent in forums: 10 m 15 sec
Reputation Power: 0
|
|
|
PHP-General - Cookie to Form
Ok I'm new, and not a PHP person.
I have a form I'm trying to submit with cookie values or url values. The URL values are going through without a hitch but for some reason the cookie values are only working now and then. For some strange reason.
see code. note this is in a joomla module hense the script tags.
<input maxlength="100" name="LEADCF7" type="hidden" value="
{source}
<?php
if($_GET['utm_source'] != ""){
echo $_GET['utm_source'],' | ', $_GET['utm_medium'];}
else{
echo $_COOKIE['tpsource'],' | ', $_COOKIE['tpmedium'];
}
?>
{/source}
"/>
<input type="hidden" maxlength='100' name='LEADCF8' value="
{source}
<?php
if($_GET['utm_source'] != ""){
echo $_GET['utm_campaign'];}
else{
echo $_COOKIE['tpcampaign'];}
?>
{/source}
"/>
|