Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a mysql table

Status
Not open for further replies.

bopritchard

Programmer
Joined
Jan 27, 2003
Messages
199
Location
US
i am retrieving a row from a mysql database into a textarea field using a WYSIWIG html editor layed over top of it...know i need to be able to update that row back to the database after editing it...i know how to write a mysql update state...i'm just not sure how to do it with that textarea field...thanks


here is my link
 
guess i didn't ask my question very well...that is my question...how do i store that value?
 
that's just it...i don't know how to do that...i know how to write a sql update statement...but i don't know how to take a returned string and update it through a browser...i'm looking for an example
 
If the link you gave is an example, I would first set the action attribute of the form you're outputting and add a submit button so that you can submit your changes.

When submitted, since you're running PHP 4.2.2, the value of the textarea (the text in it) will be available in $_POST['yourFieldNameHere'].

Use string contatenation around that PHP variable to construct a query.

Want the best answers? Ask the best questions: TANSTAAFL!
 
i don't know how to do that...can someone please point me towards an example
 
What sleipnir is trying not to say is that what you need to do is:

1) Have the form's action attribute set to a page that can handle the processing, which can be the page the form is on.
2) Get the contents of the textbox from the $_POST['FieldName'] variable.
3) Use the above in an UPDATE statement to write it back to your database.

Documentation:
Forms : POST / GET variables : UPDATE :
 
I know, but not all at once in the same place, and you seemed a bit hostile if you don't mind me saying. Sorry about the missing number, just thought it was the word part of your name that was important.
 
thanks your help KempCGDR...that was all i needed
 
KempCGDR:
Don't take the fact that I put my handle in bold as having any meaning. I do that with all TT handles I use in posts.

I don't mind your saying that I was a bit hostile -- I was. I was frankly getting quite weary of "I don't know how to do that", especially when "that" was never adequately defined. The only thing you gave bopritchard that I did not was the links -- somehow you stumbled on to the meaning of "that" in this context.

Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top