big textbox??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Nimaro
Forum Newbie
Posts: 19
Joined: Thu Nov 19, 2009 11:26 am

big textbox??

Post by Nimaro »

hy everyone,

I would like to know how can i create a big textbox so my users can write there messages. I would aprecciate ur help.
Gadgetmo
Forum Newbie
Posts: 14
Joined: Sun Nov 01, 2009 7:17 am

Re: big textbox??

Post by Gadgetmo »

Code: Select all

<textarea  rows="15" cols="40">
</textarea>
You can put that in a form like a normal input. To make it bigger, change the rows and cols.
User avatar
Nimaro
Forum Newbie
Posts: 19
Joined: Thu Nov 19, 2009 11:26 am

Re: big textbox??

Post by Nimaro »

it works.... but the message box should happear in the end and it happear in the top :/ and the textbox dosent happear clean... it happear white this code --->

Code: Select all

<tr><td>Mensagem:</td>
              <td><input type="text" name="mensagem" maxlength="30" value="" /></td></tr>          
this is the form where im trying to put the textbox for the message..

Code: Select all

<form action="insere_mensagens.php" method="post">
      <table>
          <tr><td>ID Medico:</td>
             <td><input type="text" name="id_medico" maxlength="30" value="<?php if(isset($id_medico)){echo htmlentities($id_medico);} ?>"/></td></tr>
          
          <tr><td>ID Utilizador:</td>
              <td><input type="text" name="id_utilizador" maxlength="30" value="<?php if(isset($id_utilizador)){echo htmlentities($id_utilizador);} ?>" /></td></tr>
 
          <tr><td>Data:</td>
              <td><input type="date" name="data" maxlength="30" value="<?php if(isset($data)){echo htmlentities($data);} ?>" /></td></tr>
 
          <tr><td>Hora:</td>
              <td><input type="hour" name="hora" maxlength="30" value="<?php if(isset($hora)){echo htmlentities($hora);} ?>" /></td></tr>
          <textarea  rows="10" cols="90">
          <tr><td>Mensagem:</td>
              <td><input type="text" name="mensagem" maxlength="30" value="<?php if(isset($mensagem)){echo htmlentities($mensagem);} ?>" /></td></tr>           
          </textarea>
    
          <tr><td colspan="2"><input type="submit" name="submit" value="Inserir" /></td></tr>
     </table>
</form>
User avatar
Nimaro
Forum Newbie
Posts: 19
Joined: Thu Nov 19, 2009 11:26 am

Re: big textbox??

Post by Nimaro »

i found out half of the problem :) ... i put it like this --->

Code: Select all

<tr><td>Mensagem:</td>
              <td><textarea  rows="10" cols="90"><input type="text" name="mensagem" maxlength="30" value="<?php if(isset($mensagem)){echo htmlentities($mensagem);} ?>" /></textarea></td></tr>  

But it happear with this text when i log the page ---> <input type="text" name="mensagem" maxlength="30" value="" />....

U know how can i put it clean???
User avatar
Nimaro
Forum Newbie
Posts: 19
Joined: Thu Nov 19, 2009 11:26 am

Re: big textbox??

Post by Nimaro »

Code: Select all

tr><td>Mensagem:</td>
              <td><textarea  rows="10" cols="90" input type="text" name="mensagem" maxlength="30" value="<?php if(isset($mensagem)){echo htmlentities($mensagem);} ?>" </textarea></td></tr>          
         
Done :)...

thx a lot
Post Reply