Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   Improve your ranking, submit to directories   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 04-29-2007, 04:07 PM   #1 (permalink)
Inactive
 
nster's Avatar
 
Join Date: 11-06-06
Posts: 16
iTrader: 0 / 0%
Latest Blog:
None

nster is liked by many
Question PHP - How to echo into one textarea tag ? Plz HeLp!!!

Hello guys,
am trying to make a simple shout~box with PHP ,
but i have stuck somehow ..)
am trying to make the echo to be written into a <textarea></textarea> tag , but is impossible cause when finally outputs on screen is printed there more than 1 diferent <textarea>..

Look the here :

PHP Code:
mysql_connect($lololo,$lala,$lalala) or die(mysql_error());

    
mysql_select_db($ololol) or die(mysql_error());

    
$query "SELECT msg1, theauthor, thetime, thedate, thehost 
FROM shoutbox order by id DESC LIMIT 8"
;
    
$result mysql_query($query);
    echo 
"<table>";
    while (
$r=mysql_fetch_array($result))  
  
    { 

        echo 
"<textarea><tr><td><font size='2'>
By $r[date] by <a href='mailto:$r[thetime]'>
$r[theauthor]</a></font></td></tr>
<tr><td><font size='2'>$r[msg1]</font></td></tr>
<tr><td><hr></td></tr></textarea>"
;
        
 }
    echo 
"</table>";
?> 
the result of this, will be more than 1 textarea boxes on my page.. how to correct this, so that every of thy echos that will ever be will be written into one textarea box ?

Thanks in advances fellas n' dudes
waiting for your help on it
nster is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 04-29-2007, 05:04 PM   #2 (permalink)
Inactive
 
nster's Avatar
 
Join Date: 11-06-06
Posts: 16
iTrader: 0 / 0%
Latest Blog:
None

nster is liked by many
ops (!)
i made some progress here..
i remove all tags into textarea tag and i set textarea in diferent place so now works at least the text is written into 1 textarea .

Have a look plz,

PHP Code:
      ..//connect to db etc
  
   
      
$query "SELECT msgg, author, city, date, iphost
   
      FROM shoutbox order by id DESC LIMIT 9"
;
   
          
$result mysql_query($query);
   
          echo 
"<textarea rows=10 cols=20>";
   
          while(
$r=mysql_fetch_array($result))   
   
          {
  
              echo 
"
  
      posted at-by $r[date] by <A HREF='mailto:$r[city]'>
  
      $r[author]
 
 $r[mesgg]"
;
  
             
          }

echo 
"</textarea>"

The only problem now is, the <A HREF='mailto:$r[city]'> !! <-- this tag of link .

I want to be visible a link at that place.. but is imposible to show a link there into the textarea now like this..cause if you try it the tag of href will be written there...

How to fix this , so that there into our textarea tag will work fine the a href link tang too so that will be visible a link there ??

Someone told me by replacement.. but how we can do replecment i havent done that before ..please show me how to

Thanks again waiting for your help...
nster is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-29-2007, 05:55 PM   #3 (permalink)
Inactive
 
Join Date: 04-10-07
Location: www.webfoyers.com
Posts: 68
iTrader: 0 / 0%
Latest Blog:
None

brealmz is liked by somebodybrealmz is liked by somebodybrealmz is liked by somebody
htmlentities("<A HREF='mailto:$r[city]'>");
brealmz is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-30-2007, 12:09 PM   #4 (permalink)
Contributing Member
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,007
iTrader: 0 / 0%
Latest Blog:
None

Izzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to behold
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
Okay, I don't know if this has been solved yet, but.. you need to do this in your echo tag:

PHP Code:
 echo "
  
      posted at-by "
.$r[date]." by <A HREF='mailto:".$r[city]."'>
  
      "
.$r[author]."
 
 $r[mesgg]; 
If you are trying to display an array variable, you need to get it out of the quotes of echo first, thus doing ".$variable[xxx]."
__________________
~Izzmo
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-30-2007, 02:05 PM   #5 (permalink)
Inactive
 
Join Date: 04-10-07
Location: www.webfoyers.com
Posts: 68
iTrader: 0 / 0%
Latest Blog:
None

brealmz is liked by somebodybrealmz is liked by somebodybrealmz is liked by somebody
.. sorry about that..

you can do also
htmlentities("<A HREF='mailto:{$r[city]}'>");
brealmz is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-30-2007, 06:11 PM   #6 (permalink)
Inactive
 
nster's Avatar
 
Join Date: 11-06-06
Posts: 16
iTrader: 0 / 0%
Latest Blog:
None

nster is liked by many
Smile

thanks so much guys (Izzmo, brealmz)
nster is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Echo with shopping cart ecommnewbie Coding Forum 5 12-19-2005 10:35 AM
PHP Database If/Or Echo SN3 Coding Forum 15 05-20-2005 06:50 PM
TextArea <BR> Sketch Coding Forum 2 05-05-2005 03:14 PM
<textarea> capacity? (html) Antinaris Coding Forum 1 04-24-2004 07:10 AM
Textarea problem Limit Coding Forum 6 12-20-2003 06:57 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 06:44 PM.
© Copyright 2008 V7 Inc