Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //inserimento dati nel database articoli & query di ricerca
- $hostname="localhost";
- $username="root";
- $password="";
- $err="errore";
- $conn=mysql_connect
- ($hostname,$username,$password);
- if(!$conn)
- {
- echo($err);
- exit();
- }
- mysql_select_db("articoli");
- $marca="citroen"; //$_POST["marca"];
- $modello="saxo"; //$_POST["modello"];
- $prezzo=20000; //$_POST["prezzo"];
- $insert="INSERT INTO articoli(marca,modello,prezzo)";
- $insert="VALUES('$marca','$modello','$prezzo')
- if(!mysql_query($insert))
- {
- echo($err.="input");
- //exit();
- }
- else
- {echo "INSERIMENTO AVVENUTO CON SUCCESSO
- <br><hr>";}
- mysql_close($conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement