Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dbhost = '*****';
- $dbuser = '***';
- $dbpass = '****';
- $dbname = '*****;
- $conn = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname);
- if(! $conn ) {
- die('Could not connect: ' . mysqli_error());
- }
- echo 'Connessione avvenuta con successo<br>';
- if(isset($_POST['Submit1'])) {
- // รจ stato premuto il primo pulsante
- $valorepresente= "SELECT AffittoGennaio FROM PomeziaCosti";
- mysqli_query($conn, $valorepresente);
- echo("$valorepresente");
- $valoreDaSommare = $_POST['affittogennaio'];
- $valoreDaPassare = $valorepresente + $NuovoValoreAffitto;
- $querydiupdate = "UPDATE PomeziaCosti SET AffittoGennaio ='$valoreDaPassare' ";
- mysqli_query($conn, $querydiupdate);
- /* if (mysqli_query($conn, $sql)) {
- echo "Record updated successfully";
- } else {
- echo "Error updating record: " . mysqli_error($conn);
- } */
- }
- mysqli_close($conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement