la sintassi giusta dovrebbe essere questa cmq ricontrolla bene le varibili e la connessione
Codice PHP:
<?php

include 'db.php';
session_start();


// variabili
$email $_POST['email'];
$email2$_POST['email2'];
$new_password $_POST['new_password'];
$re_new_password $_POST['re_new_password'];
$old_password $_POST['old_password'];

$query="UPDATE users SET password = '$old_password',email_address = '$email2' WHERE '$new_password' = '$re_new_password2' AND username=$username and activated='1'";

$eseguo_querymysql_query($query);

echo
"<form action=cam_dati.php method=post>
Vecchia email<input type=text name=email> 


<form action=cam_dati.php method=post>
Nuova email <input type=text name=email2> 


<form action=cam_dati.php method=post>
Nuova password<input type=text name=new_password> 


<form action=cam_dati.php method=post>
Ridigita password<input type=text name=re_new_password> 


<form action=cam_dati.php method=post>
email <input type=text name=old_password> 

Vecchia password<input type=submit value=Invia>
</form>"
;
?>