Welcome Guest, Not a member yet? Register   Sign In
POSTING hidden values

In my form I am setting these hidden values

<input type="hidden"  name="email"        value=<?php $emailString?>/>
<input type="hidden" name="campaign"  value=<?php $campaignString?>/>
<input type="hidden" name="taxyear"    value=<?php $dateString?> />

and then I submit it to  a function in the controller. This is the code that runs in the controller


But when I take a look at $campaign, $email, and $taxyear , once the form is submitted, they are all "/".  Why? 
proof that an old dog can learn new tricks

Maybe because the value is in double quotes.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

You can try something like this:

<input type="hidden" name="email" value="<?php $emailString?>">

Enclose the php code in double quotes.

just need to add echo, like this

PHP Code:
<input type="hidden" name="email" value="<?php echo $emailString ?>"

Thanks. The suggestions worked perfectly.
proof that an old dog can learn new tricks

Theme © iAndrew 2016 - Forum software by © MyBB