<?
$host = '193.25.123.111'; // MySQL hostname or IP-Adress
$port = ''; // MySQL port - leave blank for default port
$user = 'root'; // MySQL user (only needed with basic auth)
$password = 'blabla'; // MySQL password
$datenbankname = "datenbank1"; // Databasename
$db = mysql_connect($host.":".$port,$user,$password);
mysql_select_db($datenbankname,$db);
$sql = "INSERT INTO tabelle SET feld1='$feld1', feld2='$feld2'";
$result = mysql_query($sql,$db);
?>
Kommentar