August 24th, 2000, 07:00 AM
I'm using php to fill a form before I send it to a user. My problem is that following code generates many lines of spaces before the contents of $dietary -variable. I have tried but I cantīt find any solution.
What I must do?
<p align="left"><textarea rows="2" name="dietary" cols="60">
August 24th, 2000, 07:11 AM
What i think is that UR code is fine but there may be the problem with the variable value assigning. Tell about the variable $dietary where u r takng from then only I can help you.
August 24th, 2000, 07:36 AM
The value of $dietary is first entered to a mySQL-database and when the user comes back he/she can see data again.
Data seems to be right in the database.
The form works fine when I use text field:
<input type="text" name="dietary" size="65"
echo("value = '$dietary'");
but when I view generated html code there is plenty of spaces before keyword VALUE.
August 24th, 2000, 08:28 AM
The problem is that you are echoing on a seperate line so when generated you end up with a lot of whitespace. Do this:
<input type="text" name="dietary" size="65" value="<?php print $dietary ?>">
August 24th, 2000, 08:44 AM
The problem really was that I was echoing on a seperate line, which generated lot of whitespace.
Thank you for your help.