I need help please.
i have 2 files:
- ajax.php
- shows.php
and i have table in my data base that call shows. in shows table i have column - img_credit. i try to UPDATE this field.
i insert value to input field and when i click on update button i want the query run and UPDATE my database.
i try:
$(document).ready(function(){
$(".update_credit").click(function(){
<?php
$val_update = $show['img_credits'];
$link->query("UPDATE `shows` SET `img_credits` = '$val_update ' WHERE `id` = show['id'] ");
?>
if i do this i get error but if i change to:
$link->query("UPDATE `shows` SET `img_credits` = 'test' WHERE `id` = 421 ");
it's work but it not help me.
i check and the value shows['img_credit'] is not empty.
thank's