Home > Software engineering >  how to convert Text box to text area
how to convert Text box to text area

Time:06-17

I feel certain this is an easy fix for the people here however I'm racking my brain as where I'm messing this up. Right now, this is echo'd as a simple text line box. However I want to change it to a TextArea so that I can have multiple lines. This is on an edit entry page I'm working on. Any thoughts what I'm doing wrong is greatly appreciated. What I've already tried: Searching the internet for examples, re-arranging the tags for text area, and thats all I currently know to do. I couldn't not find any solutions online to fix it.

Edit: Yes there is a mix of html and php in this. This will currently display the database result in a text field. I am only trying to change it to a textarea to have multiple lines.

Many thanks

    <label for="user_review">Review </label> 
    <input type="textarea"  id="user_review" 
            value="'.$row["user_review"].'" name="user_review" 
            cols="30" rows="5">
</div>
<br>
<div ></div>
</textarea>
<br>

CodePudding user response:

Your code has a lot of errors but input with type textare does not exists. Use the textarea tag. You have only a closing textarea tag:

<label for="user_review">Review </label>
<textarea  id="user_review" name="user_review" cols="30" rows="5">
{{ $row["user_review"] }}
</textarea>

CodePudding user response:

Here is the solution thanks to everyones help in here and my edit

<label for="user_review">Review </label>
<textarea  id="user_review" name="user_review" cols="30" rows="5">
'.$row["user_review"].'
</textarea><div ><br>
  • Related