Fatal error: Call to undefined function is_aministrator()

This is the whole code… i’ve searched that maybe it could do something about the footer that it cant locate the file functions.php … but as a newbie… it could be confusing for me… maybe someone could help me here to have some good idea??? :wink:

[php]

<?php // Script 13.7 - add_quote.php define('TITLE', 'Add a Quote'); include('templates/header.html'); print '

Add a Quotations

'; if (!is_aministrator()) { print '

Access Denied!

You do not have permission to access this page.

'; include('templates/footer.html'); exit(); } if ($_SERVER['REQUEST_METHOD'] == 'POST') { If ( !empty($_POST['quote']) && !empty($_POST['soucre']) ) { $quote = mysql_real_escape_string(trim(strip_tags($_POST['quote'])), $dbc); $source = mysql_real_escape_string(trim(strip_tags($_POST['source'])), $dbc); if (isset($_POST['favorite'])) { $favorite = 1; } else { $favorite = 0; } $query = "INSERT INTO quotes(quote, source, favorite) VALUES ('$qoute', '$source', '$favorite')"; $r = mysql_query($query, $dbc); if (mysql_affected_rows($dbc) == 1) { print '

Your quotation has been stored.

'; } else { print '

Cloud not store the qoute because:
' . mysql_error($dbc) . '.

The query being run was: ' . $query . '

'; } } else { print '

Please enter a quotation and a source!

'; } } ?>
<p><label>Quote <textarea name="quote" row="5" cols="30"></textarea></label></p>
<p><label>Source <input type="text" name="source" /></label></p>
<p><label>Is this a favorite? <input type="checkbox" name="favorite" /></label></p>
<p><input type="submit" name="submit" value="Add This Quote!"/></p>
<?php include('templates/footer.html'); ?>

[/php]

sorry for this guys… now its solve…

#misspelled the administrator… from aministrator = administrator… so as a beginner like me… always be careful with when your start coding… simple error can cause so much problem… ;D

Sponsor our Newsletter | Privacy Policy | Terms of Service