Jump to content

Update Statement


bullbreed

Recommended Posts

HOw does the update statement work?

 

I have some data that is echoed into form fields on the page from the database. I then want the user to be able to edit the data and submit it to the database.

I can't get my head around the UPDATE statement.

 

I tried this

//Enter into Database

                $queryreg = mysql_query("UPDATE webpages SET

                page_name = $pagename,

                page_order = $pageorder,

                page_parent = $pageparent,

                page_title = $pagetitle,

                page_description = $pagedescription,

                page_keywords = $pagekeywords,

                page_content = $pagecontent");

                echo("<font size=\"2\" color=\"#00cc00\">Your page has been updated! </font>");

        }else{

                echo ("<font size=\"2\" color=\"#ff0000\">Please complete <b>ALL</b> fields</font>");

                }

        }     

 

It didnt work. Any ideas everyone.  ;D

 

Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/191069-update-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.