#1
  1. No Profile Picture
    ads
    Guest
    Devshed Newbie (0 - 499 posts)
    I am trying to update mysql database table with command :$query = "UPDATE tablename SET textbox = '$textbox1' WHERE textbox = '$textbox'"; $textbox1 and $textbox i am getting form form as follows :
    <form method="post" action="UPDATE.php3">

    <?

    $myrow = mysql_fetch_array($result);

    $Name = $myrow["name"];

    $textbox = $myrow["textbox"];

    ?>

    View Text : <textarea cols="45" name="textbox" wrap="VIRTUAL" rows="10"> <? echo $textbox ?></textarea><br>
    Edit Text : <textarea cols="45" name="textbox1" wrap="VIRTUAL" rows="10"> </textarea><br>

    <input type="Submit" name="submit" value="Enter information">

    </form>
    Some how it is not updating. I will be thanking for help.
    ads


    [This message has been edited by ads (edited February 12, 2000).]
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Using a long string of text as your conditional is asking for trouble. Don't you have an index for the row that you could use to identify it instead?
  4. #3
  5. No Profile Picture
    ads
    Guest
    Devshed Newbie (0 - 499 posts)
    I tried with this also but still not working.
    $query = "UPDATE $userstable SET textbox = '$textbox1' WHERE name = '$name'";
    when i try this
    $query = "UPDATE $userstable SET textbox = 'xyzabc' WHERE name = 'somename'";
    it works.

    All variable values '$textbox1', '$name'
    are creating problems.
    Waiting for reply.
    Thanks


    [This message has been edited by ads (edited February 14, 2000).]
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    print $query before sending it to make sure your variables are in there correctly.
  8. #5
  9. No Profile Picture
    ads
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi rod,
    I have changed as per your suggestion and I got it with
    $query = "UPDATE $userstable SET textbox = '$textbox1' WHERE name = '$name'";
    Thanks for help

Similar Threads

  1. Replies: 1
    Last Post: January 24th, 2004, 12:20 PM
  2. Replies: 0
    Last Post: December 30th, 2003, 12:57 PM
  3. Replies: 2
    Last Post: May 19th, 2003, 12:05 PM
  4. Replies: 3
    Last Post: July 3rd, 2001, 11:24 AM
  5. Uknow Known MYSQLERROR
    By andyw in forum MySQL Help
    Replies: 7
    Last Post: January 23rd, 2001, 09:34 AM

IMN logo majestic logo threadwatch logo seochat tools logo