Form input adding .
-
I have a form which processes and stores the information in my database. I then call the information back and store it as a variable to display in the value of the input, so it can be edited and updated. For testing I am also echoing the the variable directly after text area for comparison.
Description: <textarea name="description" rows="5" cols="40"><?php echo $description;?></textarea> <?php echo $description;?>When the echos print the one in the testarea has a </br> which isn’t present in the other echo.
The textarea text prints as follows
Test paragraph one.
Test paragraph two.Where as the regular echo prints as follows.
Test paragraph one.
Test paragraph two.This is a problem because if someone say updates their email address and doesn’t change the description and clicks save. It gets saved with the
<br />in there.What do I need to do to prevent the
<br />from being added?
The topic ‘Form input adding .’ is closed to new replies.