|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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?
|
|
#3
|
|||
|
|||
|
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).] |
|
#4
|
|||
|
|||
|
print $query before sending it to make sure your variables are in there correctly.
|
|
#5
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > UPDATE mysql database table problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|