mysql - PHP- Display data in textarea -


my goal display emails inside text area.

<?php  $q = "select * `clients`"; $userdata = mysql_query($q);  while($user = mysql_fetch_assoc($userdata)){     echo $user['email']; } ?> 

it should echo info here:

<input type="text" name="text" > 

i information fine db, im not sure how echo data single text field..

you need in following manner:-

<?php  $q = "select * `clients`"; $userdata = mysql_query($q); $email = array(); // create array   while($user = mysql_fetch_assoc($userdata)){        $email[] =  $user['email']; // assign each email array   } ?>  <textarea><?php echo implode(','$email);?></textarea> // implode array `,` emails show wiith `,` seperation. 

note:- way how need do. checking variables , necessary changes on you. thanks.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -