Greg,

Sheesh! I had neglected to do that...I've been working with a few different languages and I'm starting to confuse them I think.

Thanks for your non-offensive reply.
It's nice to see that you can overlook the little failures we have now and again.


Lloyd. :-)

At 09:58 AM 7/12/2003, you wrote:
Hi Lloyd,

use "quote"s around your values

echo "<input type=\"text\" name=\"question1_text\" value=\"$question\"><br />";

Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org

Lloyd Bayley wrote:
Greetings All,
Have a small problem that I just can't work out. I know it's an easy one but it's got me stumped...
I have some code to pull a question out of a database and display it on the screen. I also want to store it in a hidden var for
use with the $_POST on the next page.


Currently, the display bit works fine.
The only problem is the hidden var only has the first word of the question in it....and I'm setting it from the same var!!!
Eg.
If the question is: What is the problem with this stupid thing?
The hidden var will contain: "What"
What am I missing? Why has the rest of the question packed it's things and moved out???
Code Snippet
--------------------
while ($newarray = mysql_fetch_array($result)) {
$qid = $newarray['qid'];
$question = $newarray['question_text'];
echo "<br><font face = Verdana><b>$question</b></font><br>"; <----------- This works perfectly.
echo "<input type=text name=question1_text value=$question><br>";
<------------ This returns first word.


Many Thanks In Advance,

Lloyd. :-)


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to