Hi all,
i have a, maybe very simple , problem with my database(MySQL+PHP4). if want to use variables in this code it doesen´t works. Would be very happy if you could help:
$verbindung= mysql_connect("localhost","root","root"
if (!$verbindung) { echo "error"; }
else { echo "ok"; }
$name= "Test";
$preis= "12.00";
$Beschreibung= "bla";
$tabel= "angebote";
$query = 'INSERT $tabel (name,preis,beschreibung) VALUES ($name,$preis,$beschreibung)';
$erg = mysql_db_query(shop,$query,$verbindung);
mysql_close($verbindung);
i have a, maybe very simple , problem with my database(MySQL+PHP4). if want to use variables in this code it doesen´t works. Would be very happy if you could help:
$verbindung= mysql_connect("localhost","root","root"
if (!$verbindung) { echo "error"; }
else { echo "ok"; }
$name= "Test";
$preis= "12.00";
$Beschreibung= "bla";
$tabel= "angebote";
$query = 'INSERT $tabel (name,preis,beschreibung) VALUES ($name,$preis,$beschreibung)';
$erg = mysql_db_query(shop,$query,$verbindung);
mysql_close($verbindung);