PHP Code:
<?php
require_once('./global.php');
define('CSRF_PROTECTION', true);
if (!isset($_POST['submit'])) {
}
else {
$imgurl = empty($_POST['imgurl']) ? die ("ERROR: Enter a imgurl") : mysql_escape_string($_POST['imgurl']);
// create query
$db->query_write("INSERT INTO oftw_nominations (imgurl, username) VALUES ('$imgurl', '".$vbulletin->userinfo['username']."')");
header( "refresh:0; url=http://development.aniworlds.net/oftw_nominations.php" );
// close connection
mysql_close($connection);
}
?>
should do the trick