Lid |
|
Hallo,
ik ben net begonnen met php en sql, maar nu krijg ik de volgende foutmelding:Parse error: syntax error, unexpected 'mysqli_query' (T_STRING) in /home/u646264372/public_html/page1.php on line 4 bij deze code:
<?php
include 'db_config.php';
$commando="INSERT INTO `Persons` ('PersonID','LastName','FirstName') VALUES (NULL,'Jan','Man')";
mysqli_query($commando,);
?>
<?php include 'db_config.php'; $commando="INSERT INTO `Persons` ('PersonID','LastName','FirstName') VALUES (NULL,'Jan','Man')"; mysqli_query($commando,); ?>
db_config.php is dit:
<?php
$sServer = 'localhost';
$sDb_name = 'dbname';
$sUser = 'usernaam';
$sPass = 'password';
mysqli_connect( $sServer, $sUser, $sPass ) or die('Er ging iets mis: ' . mysql_error() );
?>
<?php $sServer = 'localhost'; $sDb_name = 'dbname'; $sUser = 'usernaam'; $sPass = 'password'; mysqli_connect ( $sServer, $sUser, $sPass ) or die('Er ging iets mis: ' . mysql_error() );?>
ik heb wel mijn eigen dingen even weggehaald. Hoe los ik dit op?
Niels
|