Hello everyones. I have a problem: I created the code to update a database. Everything work( no error message0 but when I go to see the table in the place where needed to be the updated information is nothing(""). Please help!
The file who update the information(ap1i_moc.php)
<?php
// Conectare la baza de date
require_once("database/connect.php");
// Transmitere informatii in variabile
$oferta=$_POST['CodOfertaVechi'];
echo $oferta;
$nume=$_POST['NumeProprietarNou'];
echo $nume;
$adresa=$_POST['AdresaNou'];
echo $adresa;
$telefon=$_POST['NumarTelefonNou'];
echo $telefon;
$email=$_POST['AdresaEmailNou'];
echo $email;
//Verificare informatii si actualizeazale
if(!$nume="")
{
$update1="UPDATE ap1i SET NumeProprietar='$nume' WHERE CodOferta='$oferta'";
$ret1 = mysql_query($update1);
if(!$ret1)
{
die('Could not update data: ' . mysql_error());
}
}
mysql_close($con);
?>
The HTML with the form code( another file):
<!---Versiunea 1.0--->
<!DOCTYPE>
<html>
<?php include("/home/a6704458/public_html/password_protect.php"); ?>
<head>
<link href="css/helper.css" media="screen" rel="stylesheet" type="text/css" />
<link href="css/button.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<form action="ap1i_moc.php" method="post">
<h4>Introduce codul oferta pentru informatiile pe care le vrei sa le actualizezi.</h4></br>
Cod oferta: <input type="text" name="CodOfertaVechi" /></br></br>
<h4>Daca nu vrei ca o informatie sa nu fie actualizata lasa goala casuta.</h4></br>
Adresa: <input type="text" name="AdresaNou" /></br>
Nume proprietar: <input type="text" name="NumeProprietarNou"/></br>
Numar telefon: <input type="text" name="NumarTelefonNou"/></br>
Adresa email: <input type="text" name="AdresaEmailNou"/></br>
<input type="submit" class="abutton" /><a href="index.html" class="abutton">Home</a>
</form>
</body>
</html>