php - Updating a row on an Admin Page -


I'm trying to create an admin page that will pull rows from a table and make changes to "admin" will allow. While I understand the code, I would like to suggest to you how I can display the line data and make it editable and secure in the database. If "admin" needs to update only the artist name, how can I manage that other data is retained? I do not know how to do it.

Updates page so far:

  & lt ;? Make Php // MySQL Connection $ con = mysqli_connect ('localhost', 'SouravBasuRoy', '2525', 'MyteraArt'); //? & Gt; & Lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Untitled document & lt; / Title & gt; & Lt; Link href = "admin-styles.css" rel = "stylesheet" type = "text / css" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1 & gt; Admin Panel: Paintings | Maitrea Art & Lt; / H1> & Lt; H2 & gt; Update a Painting & lt; / H2 & gt; & Lt; Hour & gt; & Lt; Div & gt; & Lt; H1 & gt; Search by name: & lt; / H1> & Lt; form name = "SearchByPainting" verb = "editpainting.php" method = "post" & gt; & Lt; Input list = "pictures" name = "septent" & gt; & Lt; Datalist id = "pictures" & gt; & Lt ;? Enter the query to remove the Php // artist name form database $ result = mysqli_query ($ con, 'SELECT' ArtName 'from pictures'); While ($ row = mysqli_fetch_array ($ result)) {echo '   

The table structure is: ID int (11) | ArtName Miniatures | Art Description Text | Artist's Name Little Artist | Value BiggT (11) | Just write the following code (keep your line as one) to make your data editable. File Name Varchar (5555)

  & lt; input name = "ArtName" type = "text" size = "32" value = "& lt ;? = $ Row ['ArtName']? & Gt; "& Gt; accept & input =" artist name "type =" text "size =" 32 "value =" & lt ;? = $ Row ['ArtistName']? & Gt; "& gt; & lt; input name =" value "type =" text "size =" 32 "value =" & lt ;? = $ Line ['value']? & Gt; "& gt; & lt; input name =" filename "type =" text "size =" 32 "value =" & lt ;? = $ Row ['filename']? & Gt;   

You must use html form to update this field

  & lt; Form action = "editpainting-save.php" method = "post" enctype = "multiparty / form-data" & gt; & Lt; Input ... & gt; & Lt; Input ... & gt; & Lt; / Form & gt; 

   to edit   

? $ Update_query = "Update Pictures SET ArtName = '". $ _ POST ['ArtName']. ' ', ArtName =' ". $ _ POST ['ArtName']. '', ArtName = '". $ _ POST ['ArtName'] '', ArtName = '". $ _ POST [' Art 'name']. '' 1 limited '; $ Mysqli- & gt; Query ($ update_query); ? & Gt;

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -