Jump to content

echoing php in a textfield


graham23s

Recommended Posts

Hi Guys,

 

when i echo out text from mysql in a text area field it also echoes out the line breaks e.g <br />

 

it doesn't happen if i echo out anywhere else on the page, could i do a preg_replace to make all the line breaks echo NULL?

 

     echo '<br />Replying To (<a href="user_details.php?id='.$sender_id.'">'.$sender_name.'</a>)<br /><br />
           <table with="500" border="1" bordercolor="#000000" cellspacing="0" cellpadding="5" />
           <form action="reply_sent.php?id='.$sender_id.'" method="POST" />
           <tr>
           <td>Subject:</td><td><input type="text" name="subject" size="52" value="Re: '.$subject.'"/></td>
           </tr>
           <tr>
           <td>Message:</td><td><textarea name="message" rows="10" cols="40" />------------ MESSAGE ------------'.$message.'------------ MESSAGE ------------</textarea></td>
           </tr>
           <td colspan="2" align="right" bgcolor="#004E98"/><input type="submit" name="submit" value="Send Message!" />
           </td>
           </table></form><br />'; 

 

cheers guys

 

Graham

 

 

Link to comment
https://forums.phpfreaks.com/topic/62317-echoing-php-in-a-textfield/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.