0

i had some trouble when updating a mysql field, i had 2 text fields and 1 textarea fields, both the text fields updated ok through this query: but textarea field is not updating..

edit.php

    <?php
        include('connect.php');
        $id=$_GET['id'];
        $result = $db->prepare("SELECT * FROM telugunews WHERE id= :userid");
        $result->bindParam(':userid', $id);
        $result->execute();
        for($i=0; $row = $result->fetch(); $i++){
    ?>
    <form action="edit-ac.php" method="POST">
    <input type="hidden" name="id" value="<?php echo $id; ?>" />

    News Title<br>
    <input type="text" name="newstitle" value="<?php echo $row['newstitle']; ?>" size="96" maxlength="95" /><br><br>

    News Image Link<br>
    <input type="text" name="newsimage" value="<?php echo $row['newsimage']; ?>" size="96" maxlength="95" /><br><br>

    News Content<br>
    <textarea name="newscontent" value="<?php echo $row['newscontent']; ?>" cols="30" rows="10" id="newscontent">
4
Contributors
3
Replies
35
Views
3 Years
Discussion Span
Last Post by wikit
0

Try this way

<textarea name="newscontent"  cols="30" rows="10" id="newscontent">

<?php echo $row['newscontent']; ?>

</textarea>
0

just wondering, what is the purpose of for loop and increment? Is it for speed or for some other reason/s?

0

whats your update query on the edit-ac.php page, oh as well as your $whatever="whatever" ?

Edited by wikit

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.