/    Sign up×
Community /Pin to ProfileBookmark

updating row in mysql database

I found tutorial here: [URL=”http://www.phpeasystep.com/mysql/9.html”]http://www.phpeasystep.com/mysql/9.html[/URL] but it doesn’t seems to work. How to fix it? I just want to link or button shows in every row of my table and makes me able update data from that row when I click on it ?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@PierredupJan 28.2010 — Try changing the line

[code=php]// update data in mysql database
$sql="UPDATE $tbl_name SET name='$name', lastname='$lastname', email='$email' WHERE id='$id'";[/code]


to

[code=php]// update data in mysql database
$sql = "UPDATE $tbl_name SET name='".mysql_real_escape_string($_POST['name'])."', lastname='".mysql_real_escape_string($_POST['lastname'])."', email='".mysql_real_escape_string($_POST['email'])."' WHERE id='".intval($_POST['id'])."'";[/code]


in the update_ac.php file.
Copy linkTweet thisAlerts:
@HelleshternauthorJan 28.2010 — It work's now! Thank you very much for help (again) ?
×

Success!

Help @Helleshtern spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...