i have the follwing table
name email pass
name1 email1 pass1
name2 eamil2 pass2
how can i cahnge name1 from my admin page
please any one help me
sultankhan
0
Junior Poster in Training
Recommended Answers
Jump to Post@sultankhan
how admin can change user name and all detail
i have the follwing table
name email pass
name1 email1 pass1
name2 eamil2 pass2
how can i cahnge name1 from my admin page
please any one help meIt would be nice if you can post some code! …
Jump to PostFor not making mistakes I recommend you to have one EDIT page where to edit individual users ... something as website/admin/edituser/123
There make just 1 normal form which have all current values, of the user with the id 123, and changed them to whatever you want and submit them.
Jump to PostYou need to use the WHERE clause to select the proper row to edit.
mysql_query("UPDATE users SET name = '$name' WHERE name='$SelectedNameForExample'");
that will update a specific name.
Jump to PostBefore using down code answer me, do you have user_id column at your table ?
…
If not you have to add userid column (int with autoincreament).
This way your users will have their unique ID (1,2,3,4,5,6,7,8....);
Other option is to use username as unique id but, I don't recommend that..
Jump to PostPlease check PHP documantation for such things as how header(location) works...
http://php.net/manual/en/function.header.php
(It may not work if you have ECHO something or output any html code before it)If you have ID as …
All 20 Replies
LastMitch
sultankhan
0
Junior Poster in Training
sultankhan
0
Junior Poster in Training
sv3tli0
0
Junior Poster in Training
sultankhan
0
Junior Poster in Training
NardCake
30
Posting Pro in Training
sultankhan
0
Junior Poster in Training
sv3tli0
0
Junior Poster in Training
sultankhan
0
Junior Poster in Training
sultankhan
0
Junior Poster in Training
sultankhan
0
Junior Poster in Training
sv3tli0
0
Junior Poster in Training
sultankhan
0
Junior Poster in Training
sv3tli0
0
Junior Poster in Training
tscina
0
Light Poster
sultankhan
0
Junior Poster in Training
sultankhan
0
Junior Poster in Training
tscina
0
Light Poster
sultankhan
0
Junior Poster in Training
tscina
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.