Ciao,
quando eseguo questo UPDATE la pagina si ricarica senza errori ma non mi aggiorna i dati nel db... da cosa può dipendere secondo voi?
Codice PHP:
if ( $_REQUEST['attendee_action'] == 'delete_attendee' ){
$id = $_REQUEST['id'];
$sql= " DELETE FROM ". $events_attendee_tbl . " WHERE id ='$id'";
$wpdb->query($wpdb->prepare($sql));
}
else if ( $_REQUEST['attendee_action'] == 'update_attendee' ){
$id = $_REQUEST['id'];
$regisration_id=$row['id'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$hear = $_POST['hear'];
$event_id=$_POST['event_id'];
$payment = $_POST['payment'];
$custom_1 =$_POST['custom_1'];
$custom_2 =$_POST['custom_2'];
$custom_3 =$_POST['custom_3'];
$custom_4 =$_POST['custom_4'];
$sql="UPDATE ". $events_attendee_tbl . " SET fname='$fname', lname='$lname', address='$address', city='$city', state='$state', zip='$zip', phone='$phone', email='$email', payment='$payment', hear='$hear', custom_1='$custom_1', custom_2='$custom_2', custom_3='$custom_3', custom_4='$custom_4' WHERE id ='$id'";
$wpdb->query($wpdb->prepare($sql));