Nieuw lid |
|
ik volg een tutorial op http://www.easy...l-database/
en ik heb gedaan wat ze zeiden enzo maar als ik het upload en uitprobeer (wat ze na 10:30 doen)
krijg ik de volgende fout:
Parse error: syntax error, unexpected T_IF in /storage/mijndomein/users/107932/public/sites/www.janwillem-117.nl/yourpage.php on line 17
dit is mijn yourpage.php:
<?php function nukeMagicQuotes() {
if (get_magic_quotes_gpc()) {
function stripslashes_deep($value) {
$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
return $value;
}
$_POST = array_map('stripslashes_deep', $_POST);
$_GET = array_map('stripslashes_deep', $_GET);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
}
?>
<?php nukeMagicQuotes(); ?>
<?php
// Connect to the database
$cnx = mysql_connect("localhost", "zegikniet", "zegikniet")
if (!$cnx) {
die("Unable to connect to database!");
}
// Select your database
mysql_select_db("zegikniet", $cnx);
// Get data from the database
$query = mysql_query("SELECT data FROM fck_data WHERE id = 1");
$data = mysql_fetch_array($query);
?>
<!-- This is where the content from your database is displayed
we are telling the database to display the content from the field in
the database called data -->
<div>
<?php echo $data[data]; ?>
</div>
<?php function nukeMagicQuotes() { function stripslashes_deep($value) { return $value; } $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); } } ?> <?php nukeMagicQuotes(); ?> <?php // Connect to the database if (!$cnx) { die("Unable to connect to database!"); } // Select your database // Get data from the database $query = mysql_query("SELECT data FROM fck_data WHERE id = 1"); ?> <!-- This is where the content from your database is displayed we are telling the database to display the content from the field in the database called data --> <div> <?php echo $data[data ]; ?> </div>
wat is er fout?
|