Hi, ok what I meant was that it loads the page but doesn't do anything and now I've finished changing it I've got
"11Array" written from the echo's... so basically:
1
1
Array
Is that correct? That's the output I get.. but basically only the links are inserted, nothing else happens.
I've changed the code:
<?php
Include("../includes/confstring.php");
Include("../includes/variables.php");
$link = "insertil.php";
Include("../includes/sessions.php");
If (!$_GET['id'])
{
header("location: $siteurl/admin/index.php");
}
else
{
$id = $_GET['id'];
}
$username = $_SESSION['username'];
$rank = $_SESSION['user_rank'];
//Submit to mysql
$link = $_POST['rlink'];
$link = stripslashes($link);
$link = mysql_escape_string($link);
$alink = mysql_query("INSERT INTO links (sectionid,link) VALUES ('" . $id . "','" . $link . "')")
or die(mysql_error());
$cpt = $_POST['caption'];
$cpt = stripslashes($cpt);
$cpt = mysql_escape_string($cpt);
$img = $_FILES['image']['name'];
$img = stripslashes($img);
$img = mysql_escape_string($img);
move_uploaded_file ($_FILES['image']['tmp_name'], "$siteurl/files/images/".$_FILES['image']['name']);
$aimg = mysql_query("INSERT INTO images (sectionid,caption,image) VALUES ('" . $id . "','" . $cpt . "','" . $img . "')")
or die(mysql_error());
echo $alink;
echo $aimg;
echo $img;
?>
Hmm, now I get this message:
1
1
Image name.gif or whatever
But it doesn't upload anything.
So it's got to be something to do with this line:
move_uploaded_file ($_FILES['image']['tmp_name'], "$siteurl/files/images/".$_FILES['image']['name']);
It also inserts the image name correctly into the database.. it just does not copy. :@ lol. 😃
Anything? Thanks in advance, Chris.