Vai al contenuto
View in the app

A better way to browse. Learn more.

Autopareri

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Qualche esperto di PHP/Mysql?

Featured Replies

Inviato

Ho composto il seguento codice php:

<?php$conn = mysql_connect("localhost", "root", "");
If (! $conn)
{
echo ("errore durante la connessione a MySQL.");
exit ();
}
mysql_select_db("autonoleggio");
$sqlcmd = "SELECT datediff (checkout, checkin)";
$sqlcmd .= "FROM prenotazioni";
$sqlcmd .= "WHERE codfiscale = '$codfisc'";
$ris = mysql_query( $sqlcmd ) OR exit('Errore nell interrogazione');
if ( mysql_num_rows($ris)==0 )
exit("Non ci sono prenotazioni nella data selezionata");
?>
<TABLE BORDER=1 CELLPADDING=4>
<TR>
<TH>cod fiscale</TH>
<TH>giorni</TH>
</TR>

che va a prendere una variabile "codfisc"

da questa pagina html

<BODY><H3>Elenco</H3>
<HR>
Inserisci
<HR>
<FORM ACTION="fatture.php" METHOD="POST" >
<p>
Inserisci codice fiscale
<INPUT TYPE="text" NAME="codfisc"><br>
<HR><BR>
Inserisci data check in
<INPUT TYPE="date" NAME ="checkin"><br>
<HR><BR>
<INPUT TYPE=submit VALUE="Invia domanda">
<INPUT TYPE=reset VALUE="Annulla">
</form>
<HR>
</BODY>

Mi viene restituito il seguente messaggio

Notice: Undefined variable: codfisc in C:\Program Files\EasyPHP-DevServer-13.1VC9\data\localweb\projects\fatture.php on line 11

Errore nell interrogazione

Dove sto sbagliando?

La variabile dovrebbe esserci dal form html

Crea un account o accedi per lasciare un commento

Background Picker
Customize Layout

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.