Jump to content

Error404PageNotFound

New Members
  • Posts

    1
  • Joined

  • Last visited

Error404PageNotFound's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <p><p>HI I am having trouble using this function, I am hosting my website on 1and1 with the following php.ini: register_globals = 0 allow_url_fopen = 1 session.bug_compat_warn = 0 memory_limit = 128M max_execution_time=3600 post_max_size = 128M upload_max_filesize= 128M upload_tmp_dir = '/temp' And this is the code used to upload the file: <?php include ('connection.php'); session_start(); $target = "Images/"; $pic=$HTTP_POST_FILES['previewImage']['tmp_name']; $destination='/Images'; $date = date('d-m-Y'); $postarticle = "INSERT INTO articles VALUES (NULL,'$_POST[title]',CURDATE(), '{$_SESSION['ID']}','Images/$_POST[previewImage]', '$_POST[preview]', '$_POST[video]', '$_POST[content]', '$_POST[additionalInformation]', '$_POST[type]')"; if (mysql_query($postarticle,$conn)){ move_uploaded_file($pic,$destination.$HTTP_POST_FILES['previewImage']['name']); header("Location: index.php"); } else { header("Location: {$_SERVER['HTTP_REFERER']}"); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.