My code doesn’t work? [duplicate]

This question already has an answer here:

Okay guys this is kinda strange, because the code in a way does work, but it seems like he ignores the code above and jumps directly to the msqli_query line which doens’t seem to work either. Is there something wrong with my code? oh and btw ”test34” is the database I want to access through this php script.

<?php
$db = mysqli_connect('localhost', 'test34')
or die('u failed'); 

$sql = "INSERT INTO test34 (test1, test2, test3, test4)"; 

$ergebnis = mysqli_query($db, $sql)
or die('u failed again'); 

mysqli_close($db);
?>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s