php - Updating MySql table when clicking a button based on content from the table (but not when refreshing the page) -


i'm randomly loading string database table used load youtube video. when user clicks button, want value related loaded video updated in database.

previously had: $uv = $mysqli->query("update table set x = x + 1 embedcode = '" . $row[embedcode]. "';"); , <a href="<?php echo $uv ?>">test</a>

this works triggered when page loads opposed when button clicked. don't have use anchor tag, assumed doing mean when clicking on link table updated, apparently not.

what's best way go this?

ajax

it allows values sent without refresh using javascript , xml


Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -