mi carica una pagina bianca quando invece vorrei che rimanesse nella stessa pagina (login_success.php) e con il dato modificato
cosa ho sbagliato?
il form è questo:
Codice PHP:
<form name="modifica_regione" method="post" action="modifiche_utenti/modifica_regione.php">
<input name="modifica_regione" type="text" />
<input type="submit" value="modifica_regione" />
</label>
</form>
modifica_regione.php è questo:
Codice PHP:
<?php
$host=""; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name=""; // Database name
$tbl_name=""; // Table name
// Connect to server and select database
mysql_connect("$host", "$username", "$password", "$db_name")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
mysql_query("UPDATE tabella SET regione='" . $_POST['modifica_regione'] . "' WHERE utente='" . $_SESSION['utente'] . "'");
if(mysql_affected_rows() > 0) //l'update ha avuto successo
echo "Regione modificata";
?>
ovviamente i dati del db in remoto nn li ho messi