Friday 15 July 2011

javascript - Editing tables in SQL database with PHP -


OK, it's been around 5 hours because I've worked on this bit & amp; I can not get it to work I have looked everywhere but my codes seem to be just ... Unique Anyways I am trying to change the entries in a particular table in my SQL database. The name of the table is userdb. I have 5 text boxes, names, usernames, passwords, emails and IDs where the query to be searched for the ID entry will require the primary key of the ID and the remaining 4 text boxes fill the new entries. I will go.

The content here is my main PHP file named Admin.php, it's in a prominent tag:

    

This one in the body:

   Name & lt; / Font & gt; & Lt; Input class = "test1" type = "text" id = "txnm" value = "" onkeyup = "nosspace (this)" & gt; & Lt; Font color = "white" & gt; Username & lt; / Font & gt; & Lt; Input class = "test1" type = "text" id = "txUsn" value = "onkeyup =" nospaces (this) "& gt; & Lt; Font color = "white" & gt; Password & lt; / Font & gt; & Lt; Input class = "test1" type = "password" id = "txPwd" value = "onkeyup =" nospaces (this) "& gt; & Lt; Font color = "white" & gt; E-mail & lt; / Font & gt; & Lt; Input class = "test1" type = "text" id = "txEml" value = "onkeyup =" nospaces (this) "& gt; & Lt; Font color = "white" & gt; Updater - ID, only affected by the removal & amp; Update button & Lt; / Font & gt; & Lt; Input class = "test1" type = "text" id = "txUserid" value = "onkeyup =" nospaces (this) "& gt; & Lt; Input class = "test4" name = "submit" type = "submit" value = "" id = "submit" />   

This is my updated user function stored in 'mshop2.script.js':

  function update user () {var name = $ ( '# TxNm') Val () .; Var Username = $ ('# TxUSN'). Val (); Var Password = $ ('# TxPWD') Val (); Var email = $ ('# txEml') Val (); Var id = $ ('# txUserid'). Val (); Var finalized = {nm: name, usn: username, pwd: password, eml: email, uid: userid}; $ .post ('updateUser.php', last data, function) {if (resp == 'success') {Warning ('User successfully modified.'); GetUserList ();}}); }   

This is my updated user.php file:

    

I do not know what is happening due to not doing this, I want to enter the desired entry, say, if I in the id text box The id will be same but the remaining fields are empty. What time have I done?

I think you have more than one thing Be Till are made - before I switch to using the right say where you are and Skyuelai.

To use regular SQL, at least I will see the MySQLi manual. You will find what you are looking for .. Goodluck!

No comments:

Post a Comment