Jump to content

watermark help


darkfreaks

Recommended Posts

not sure what i am doing wrong but when i try to call this watermark function i get "query failed" "included failed" errors which doesnt happen unless i call the function.

 

maybe someone can sort out my code so that it uploads the watermark correctly  :-[

 

http://www.plus2net.com/php_tutorial/gd-water.php

 

upoad.php

<?php

include("include/session.php");



$caption = $_POST['caption'];

    $target_path = "gallery/";

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 

$file_path = basename( $_FILES['uploadedfile']['name']); 
$file_size = basename( $_FILES['uploadedfile']['size']); 
$username = $session->username;
$time = $session->time;

if ($file_size > '4194304'){

//echo 'error '. $file_size;

header('Location: gallery.php?id=error');

} else {

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
  $location_height=300; // Location of water mark
$location_width=300; // Location of water mark 

$add="gallery/$file_path"; // Source directory location
$add2="destination/$file_name"; // Destination directory location
$water_img="wtt7.gif"; // Water Image file

    //echo "The file ".  basename( $_FILES['uploadedfile']['name']). 
    //" has been uploaded<br><br>Link: <a href=\"http://www.thetastingroomokc.com/gallery/". basename( $_FILES['uploadedfile']['name'])  ."\">http://www.thetastingroomokc.com/gallery/". basename( $_FILES['uploadedfile']['name'])  ."</a>";
    
    mysql_query("INSERT INTO gallery VALUES ('', '$username', '$time', '$caption' , '$file_path' )");
    
    //echo $file_size.' is how big your file is. It was transferred.';
    
    header('Location: gallery.php');
    
} else{
   // echo "There was an error uploading the file, please try again!";
}
}

?>

Link to comment
https://forums.phpfreaks.com/topic/215059-watermark-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.