John, that worked great.  Thanks again for your help, I am going to do a
tutorial on using textareas in order to edit contents of a database
considering i had a hell of a time trying to find one elsewhere.
Jas
"John Hughes" <[EMAIL PROTECTED]> wrote in message
003e01c1ceb2$a05f8680$[EMAIL PROTECTED]">news:003e01c1ceb2$a05f8680$[EMAIL PROTECTED]...
> "jas" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I need some help with a query to place the results within a text area...
> > here is the code and so far every time I try it out all that happens is
it
> > displays the textbox but not the results of the query.
> > <form name="wel_area" method="post" action="index_confirm.php3
> target="box">
> >         <?php
> > $record = mysql_fetch_array(@mysql_query("SELECT wel_area FROM
> > cm_index",$dbh));
> > echo "<textarea name='wel_area' value='{$record['wel_area']}' cols='25'
> > rows='8'></textarea><br><input type='submit' name='save'
> > value='save'><br>\n";
> > ?>
> >       </form>
> > Any help would be great.
> > Jas
> >
>
>
> If the "wel_area" is a TEXT field in the database, why the array
treatment.
> I have a database that contains several TEXT fields that I can call up and
> edit.  To do that I bring the data into a textarea.
>
> Here's part of my code:
>
> The SQL query:
>
> $sql = "SELECT subj, body, info, fname, lname, title, city, other,
>   record_date, status, batch, modified_by
>   FROM $table_name
>   WHERE id = '$id'
>   ";
>
> The results are read into variables:
>
> while ($row = mysql_fetch_array($result)) {
>   $subj = $row['subj'];
>   $body = $row['body'];
>   $info = $row['info'];
>   $fname = $row['fname'];
>   $lname = $row['lname'];
>   $title = $row['title'];
>   $city = $row['city'];
>   $other = $row['other'];
>   $record_date = $row['record_date'];
>   $status = $row['status'];
>   $batch = $row['batch'];
>   $modified_by = $row['modified_by'];
>  } #end while
>
> In the body of the HTML section I have areas such as this:
>
> <td>
>   <textarea cols="60" rows="20" name="body" wrap="soft"> <? echo "$body";
> ?></textarea>
>  </td>
>
> This creates an editable TEXTAREA that can then be UPDATEd in the
database.
>
> John Hughes
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to