• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Hidden variables question

jonmullen

Platinum Member
When I try to use a hidden text field to hold a string variable (i.e. "Some thing that contains several words") it will only hold up to the first space. For example If the text in the hidden text field was "How are you doing?" then it will only come out as "How". How can I get it to keep the whole sentence?
 
I'm fairly certain this is not the appropriate forum, but just in case (since html really isn't a programming language)

<input type=hidden name=boo value="whatever you want"> <- correct
<input type=hidden name=bob value=this is no good> <-wrong

Don't forget the quotes.
 
Originally posted by: yoda291
I'm fairly certain this is not the appropriate forum, but just in case (since html really isn't a programming language)

<input type=hidden name=boo value="whatever you want"> <- correct
<input type=hidden name=bob value=this is no good> <-wrong

Don't forget the quotes.

I have the quotes, I am actually passing a php variable.

the forum is like this.
<?php
echo '<form action="bot.php" method="post">
<input type=hidden name=boo value=';
echo "$variable" ;
echo '>'
?>

Ugly, I know, but that is why I am looking for a better way to do it.
 
Oh wait, nevermind you were right, I just got lost in my quotes i did not see that I forgot to add those. OK

<?php
echo '<form action="bot.php" method="post">
<input type=hidden name=boo value=';
echo "\"$variable\"";
echo '>'
?>


That should work
 
Back
Top