Visualizzazione dei risultati da 1 a 5 su 5

Discussione: Dove sbaglio?

  1. #1
    Utente di HTML.it L'avatar di nep036
    Registrato dal
    Nov 2003
    Messaggi
    1,453

    Dove sbaglio?

    Parse error: parse error, unexpected T_IF in /home/joglife/public_html/web/updatedata.php on line 44

    Io sinceramente non vedo l'errore...

    codice:
    <?
    
    require ('conf.inc4.php');
    
    $name = $_POST['name'];
    $email = $_POST['email'];
    $telephone = $_POST['telephone'];
    $price = $_POST['price'];
    $zone = $_POST['zone'];
    $category = $_POST['category'];
    $smoking = $_POST['smoking'];
    $gender = $_POST['gender'];
    $details = $_POST['details'];
    $username = $_POST['username'];
    $password = $_POST['pwd'];
    $id = $_POST['id'];
    $date= date ('y-m-d');
    $reg_ok='Messaggio inserito correttamente!';
    $srv_err='Server occupato, si prega di riprovare.';
    
      $body2="
    data :    $date
    Nome :    $name
    Tel. :    $telephone
    Email:    $email
      
    Prezzo:   $price
    Zona  :   $zone
    Cat.  :   $category
    Smoking:  $smoking
    Gender:   $gender
    
    Dettagli offerta:
    
    $details
    ";
    $header2 = "From: " . $name . " <" .$email .">";
    $oggetto2="Nuovo Annuncio Casa";
    
    $clean = "DELETE FROM rooms WHERE date <= CURDATE() - INTERVAL 1 MONTH";
    $query = "UPDATE rooms WHERE id = '$id' SET date = '$date', name = '$name', telephone = '$telephone', email = '$email', price = '$price', zone = '$zone', category = '$category', smoking = '$smoking', gender = '$gender', details = '$details', username = '$username', password = '$password'"
    
    
    if (!mysql_connect($DBhost, $DBuser, $DBpass)) {
    mail("xxx", "$oggetto2", "$body2", "$header2");
    print '&msg2='.$srv_err;
    exit;
    } else {
    mysql_query($clean);
    mysql_query($query);
    mail("xxx", "$oggetto2", "$body2", "$header2");
    print '&msg2='.$reg_ok;
    exit;
    }
    
    ?>
    Grazie

  2. #2
    Utente di HTML.it L'avatar di nabozzz
    Registrato dal
    Nov 2004
    Messaggi
    145
    Ciao

    codice:
    $query = "UPDATE rooms WHERE id = '$id' SET date = '$date', name = '$name', telephone = '$telephone', email = '$email', price = '$price', zone = '$zone', category = '$category', smoking = '$smoking', gender = '$gender', details = '$details', username = '$username', password = '$password'"
    il ; in fondo.

    byez

  3. #3
    Utente di HTML.it L'avatar di nep036
    Registrato dal
    Nov 2003
    Messaggi
    1,453
    Originariamente inviato da nabozzz
    Ciao

    codice:
    $query = "UPDATE rooms WHERE id = '$id' SET date = '$date', name = '$name', telephone = '$telephone', email = '$email', price = '$price', zone = '$zone', category = '$category', smoking = '$smoking', gender = '$gender', details = '$details', username = '$username', password = '$password'"
    il ; in fondo.

    byez



  4. #4
    magari oltre al codice sbagli anche nel titolo del thread
    The fastest Redis alternative ... cachegrand! https://github.com/danielealbano/cachegrand

  5. #5
    Utente di HTML.it L'avatar di nep036
    Registrato dal
    Nov 2003
    Messaggi
    1,453
    Originariamente inviato da daniele_dll
    magari oltre al codice sbagli anche nel titolo del thread
    In effetti è vero, però sinceramente non sapevo come intitolarlo...

    oramai

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.