0

Hi,

Pretty new to php so would like some advice on how to insert linefeed to the text area.

here is my senario

the query:

$polQuery   = "SELECT * FROM users WHERE user_id='$userid' AND status='active' LIMIT 1";
$polResult = smart_mysql_query($polQuery);
$polTotal   = mysql_num_rows($polResult);

if ($polTotal > 0)
{
$row = mysql_fetch_array($polResult);
}

textarea

<textarea name="payment_details" cols="40" rows="3" class="inputt2"><?php echo $row['polnum']; ?> <?php echo $row['provider']; ?></textarea>

How do I insert carriage return between <?php echo $row['polnum']; ?> <?php echo $row['provider']; ?>

ie <?php echo $row['polnum']; ?> Carriage Return Here <?php echo $row['provider']; ?>

The test area will then look like:
12345
Lloyds TSB

Thanks for help in advance
Darren

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by niranga
0

Try by adding ."\n" at the first echo:

<textarea name="payment_details" cols="40" rows="3" class="inputt2"><?php echo $row['polnum']."\n"; ?> <?php echo $row['provider']; ?></textarea>

bye!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.