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">

Try this way

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

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

</textarea>

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.