Jump to content

andy_b_1502

Members
  • Posts

    397
  • Joined

  • Last visited

Everything posted by andy_b_1502

  1. Any ideas??? :wtf:
  2. Thanks but i need help fitting all the pieces together, im not sure where each bit goes. I have this upload and resize script but now iv'e modified it, it won't upload the image or resize? What am i doing wrong? <?php error_reporting(E_ALL); ini_set("display_errors", 1); echo '<pre>' . print_r($_FILES, true) . '</pre>'; //This is the directory where images will be saved $target = "/home/users/web/b109/ipg.removalspacecom/images/COMPANIES"; $target = $target . basename( $_FILES['upload']['name']); //This gets all the other information from the form $company_name=$_POST['company_name']; $basicpackage_description=$_POST['basicpackage_description']; $location=$_POST['location']; $postcode=$_POST['postcode']; $upload=($_FILES['upload']['name']); // Connects to your Database mysql_connect("sever", "user", "password") or die(mysql_error()) ; mysql_select_db("DB") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO `Companies` (company_name, basicpackage_description, location, postcode, upload) VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload')") ; echo mysql_error(); $uploadDir = 'images/COMPANIES'; // main picture folder $max_height = 450; // largest height you allowed; 0 means any $max_width = 450; // largest width you allowed; 0 means any $max_file = 2000000; // set the max file size in bytes $image_overwrite = 1; // 0 means overwite; 1 means new name $allowed_type01 = array( "image/gif", "image/pjpeg", "image/jpeg", "image/png", "image/x-png", "image/jpg"); // add or delete allowed image types $do_thumb = 1; // 1 make thumbnails; 0 means do NOT make $thumbDir = "/images/thumbs"; // thumbnail folder $thumb_prefix = ""; // prefix for thumbnails $thumb_width = 90; // max thumb width $thumb_height = 70; // max thumb height $do_shadow = 0; // 0 to add drop shadow to main image. 1 do NOT $flat_file = 0; // 1 flat file for data; 0 database $what_error = array(); // error message array/* // RESIZE FUNCTION */ function Resize_Image($save,$file,$t_w,$t_h,$s_path,$o_path) { $s_path = trim($s_path); $o_path = trim($o_path); $save = $s_path . $save; $file = $o_path . $file; $ext = strtolower(end(explode('.',$save))); list($width, $height) = getimagesize($file) ; if(($width>$t_w) OR ($height>$t_h)) { $r1 = $t_w/$width; $r2 = $t_h/$height; if($r1<$r2) { $size = $t_w/$width; } else{ $size = $t_h/$height; } } else{ $size=1; } $modwidth = $width * $size; $modheight = $height * $size; $tn = imagecreatetruecolor($modwidth, $modheight) ; switch ($ext) { case 'jpg': case 'jpeg': $image = imagecreatefromjpeg($file) ; break; case 'gif': $image = imagecreatefromgif($file) ; break; case 'png': $image = imagecreatefrompng($file) ; break; } imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ; return;} /* END OF RESIZE FUNCTION */ //Writes the photo to the server if(move_uploaded_file($_FILES['upload']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['upload']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?> this is what i end up with: http://www.removalspace.com/index.php note all the images different sizes.
  3. Hi everyone, I am after a scrpit/function that will get information of an uploaded image, resize it, then display the manipulated image. in my "upload" script, there will be a size limit and a file extension/type limit to: 600 x 200px / jpg, gif, jpeg... this is to keep the script i'm after more simple. As using vector images i'm told is such a complicated problem for me at this time. So... to get the size info/dimensions its like this: <?php list($width, $height, $type, $attr) = getimagesize("image_name.jpg"); echo "Image width " .$width; echo "<BR>"; echo "Image height " .$height; echo "<BR>"; echo "Image type " .$type; echo "<BR>"; echo "Attribute " .$attr; ?> and..... resize something like this: function get_image_sizes($sourceImageFilePath, $maxResizeWidth, $maxResizeHeight) { // Get width and height of original image $size = getimagesize($sourceImageFilePath); if($size === FALSE) return FALSE; // Error $origWidth = $size[0]; $origHeight = $size[1]; // Change dimensions to fit maximum width and height $resizedWidth = $origWidth; $resizedHeight = $origHeight; if($resizedWidth > $maxResizeWidth) { $aspectRatio = $maxResizeWidth / $resizedWidth; $resizedWidth = round($aspectRatio * $resizedWidth); $resizedHeight = round($aspectRatio * $resizedHeight); } if($resizedHeight > $maxResizeHeight) { $aspectRatio = $maxResizeHeight / $resizedHeight; $resizedWidth = round($aspectRatio * $resizedWidth); $resizedHeight = round($aspectRatio * $resizedHeight); } // Return an array with the original and resized dimensions return array($origWidth, $origHeight, $resizedWidth, $resizedHeight); } // Get dimensions $sizes = get_image_sizes($sourceImageFilePath, $maxResizeWidth, $maxResizeHeight); $origWidth = $sizes[0]; $origHeight = $sizes[1]; $resizedWidth = $sizes[2]; $resizedHeight = $sizes[3]; // Create the resized image $imageOutput = imagecreatetruecolor($resizedWidth, $resizedHeight); if($imageOutput === FALSE) return FALSE; // Error condition // Load the source image $imageSource = imagecreatefromjpeg($sourceImageFilePath); if($imageSource === FALSE) return FALSE; // Error condition $result = imagecopyresampled($imageOutput, $imageSource, 0, 0, 0, 0, $resizedWidth, $resizedHeight, $origWidth, $origHeight); if($result === FALSE) return false; // Error condition // Write out the JPEG file with the highest quality value $result = imagejpeg($imageOutput, $outputPath, 100); if($result === FALSE) return false; // Error condition And.... display is this: <?php $database="***"; mysql_connect ("***", "***", "***"); @mysql_select_db($database) or die( "Unable to select database"); $result = mysql_query( "SELECT company_name, location, postcode, basicpackage_description, premiumuser_description, upload FROM Companies" ) or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); print "\n\n\nThere are $num_rows records.<P>"; echo "<table><tr><th>Comppany Name</th><th>Location</th><th>Postcode</th><th>Basic Members</th><th>Upgraded Users</th><th>Company Logo</th></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>";// store the records into $row array and loop through while ( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ) { // Print out the contents of the entry echo "<tr><td>{$row['company_name']}</td>"; echo "<td>{$row['location']}</td>"; echo "<td>{$row['postcode']}</td>"; echo "<td>{$row['basicpackage_description']}</td>"; echo "<td>{$row['premiumuser_description']}</td>"; echo "<td><img src=\"http://www.removalspace.com/images/COMPANIES{$row['upload']}\" alt=\"logo\" /></td></tr>";} echo "</table>"; ?> How will all these fit together in one script? any help i'd love it! many thanks in advance
  4. "$file is the name of the original image WITHOUT the path;" ---- I need to state this everytime?? isn't there a way of choosing every image thats uploaded? $save is the name of the resized image WITHOUT the path; ---- My existing script currently gives uploaded images a generated name to put to the server; what do i put here. $t_w is the MAXIMUM width of the new image; ---- this will end up being 200px $t_h is the MAXIMUM height of the new image; ---- this will end up 200px also $o_path is the path to the original image INCLUDING the trailing slash; ---- "http://www.removalspace.com/images/COMPANIES $s_path is the path where you want to save the new image INCLUDING the trailing slash. ---- "http://www.removalspace.com/images/COMPANIES then all these fit under the while loop? right?
  5. I am absolutley stumped with this: im trying to have PHP get the size of an image that has been uploaded to mySQL, and return it to a certain size, lets say 200X200px. The problems im having to finding an existing script to help me understand - and then fit it into a table? All the help from google searches seem to suggest using software, but i would like to learn how to do this properly. First off the upload script: <?php error_reporting(E_ALL); ini_set("display_errors", 1); echo '<pre>' . print_r($_FILES, true) . '</pre>'; //This is the directory where images will be saved $target = "/home/users/web/b109/ipg.removalspacecom/images/COMPANIES"; $target = $target . basename( $_FILES['upload']['name']); //This gets all the other information from the form $company_name=$_POST['company_name']; $basicpackage_description=$_POST['basicpackage_description']; $location=$_POST['location']; $postcode=$_POST['postcode']; $upload=($_FILES['upload']['name']); // Connects to your Database mysql_connect("server", "user", "password") or die(mysql_error()) ; mysql_select_db("removalspacelogin") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO `Companies` (company_name, basicpackage_description, location, postcode, upload) VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload')") ; echo mysql_error(); //Writes the photo to the server if(move_uploaded_file($_FILES['upload']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['upload']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?> this works great, it uploads the users pictures. This displays them out: <?php $database="removalspacelogin"; mysql_connect ("server", "user", "password"); @mysql_select_db($database) or die( "Unable to select database"); $result = mysql_query( "SELECT company_name, location, postcode, basicpackage_description, premiumuser_description, upload FROM Companies" ) or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); print "\n\n\nThere are $num_rows records.<P>"; echo "<table><tr><th>Comppany Name</th><th>Location</th><th>Postcode</th><th>Basic Members</th><th>Upgraded Users</th><th>Company Logo</th></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>";// store the records into $row array and loop through while ( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ) { // Print out the contents of the entry echo "<tr><td>{$row['company_name']}</td>"; echo "<td>{$row['location']}</td>"; echo "<td>{$row['postcode']}</td>"; echo "<td>{$row['basicpackage_description']}</td>"; echo "<td>{$row['premiumuser_description']}</td>"; echo "<td><img src=\"http://www.removalspace.com/images/COMPANIES{$row['upload']}\" alt=\"logo\" /></td></tr>";} echo "</table>"; ?> Right now all the information in my table is fine except the image coloumn, the images are all the same size as they went in, i'd like them to all be one size so there in a uniformed fashion. But need all the rest of the mySQL table displayed, so how does it fit into my script to display the table? Many thanks!??? :confused:
  6. still havent got this sunk in yet - bump
  7. Im still having a little trouble working out how these all gel together guys, if annyone has any ideas or help, that would be great, many thanks!
  8. plus i forgot to add in that it needs a php(include) which is this: <?php include('SimpleImage.php'); $image = new SimpleImage(); $image->load('picture.jpg'); $image->resize(250,400); $image->save('picture2.jpg'); ?> where does that go in my orginal script to resize the image at the time of upload. orginal script is this: <?php error_reporting(E_ALL); ini_set("display_errors", 1); echo '<pre>' . print_r($_FILES, true) . '</pre>'; //This is the directory where images will be saved $target = "/home/users/web/b109/ipg.removalspacecom/images/COMPANIES"; $target = $target . basename( $_FILES['upload']['name']); //This gets all the other information from the form $company_name=$_POST['company_name']; $basicpackage_description=$_POST['basicpackage_description']; $location=$_POST['location']; $postcode=$_POST['postcode']; $upload=($_FILES['upload']['name']); // Connects to your Database mysql_connect("***", "***", "***") or die(mysql_error()) ; mysql_select_db("***") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO `Companies` (company_name, basicpackage_description, location, postcode, upload) VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload')") ; echo mysql_error(); //Writes the photo to the server if(move_uploaded_file($_FILES['upload']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['upload']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?>
  9. i've found this script that is meant to do the job, i dont claim to fully understand it = but by looking at it, it scales and resizes most images BUT it obviously needs an image to actually resize. Would i be able to just put it underneath the existing script i previously uploaded or would there be some messing around to make things fit better for the resize function to work with my script i already have? <?php class SimpleImage { var $image; var $image_type; function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if( $this->image_type == IMAGETYPE_JPEG ) { $this->image = imagecreatefromjpeg($filename); } elseif( $this->image_type == IMAGETYPE_GIF ) { $this->image = imagecreatefromgif($filename); } elseif( $this->image_type == IMAGETYPE_PNG ) { $this->image = imagecreatefrompng($filename); } } function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image,$filename,$compression); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->image,$filename); } elseif( $image_type == IMAGETYPE_PNG ) { imagepng($this->image,$filename); } if( $permissions != null) { chmod($filename,$permissions); } } function output($image_type=IMAGETYPE_JPEG) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->image); } elseif( $image_type == IMAGETYPE_PNG ) { imagepng($this->image); } } function getWidth() { return imagesx($this->image); } function getHeight() { return imagesy($this->image); } function resizeToHeight($height) { $ratio = $height / $this->getHeight(); $width = $this->getWidth() * $ratio; $this->resize($width,$height); } function resizeToWidth($width) { $ratio = $width / $this->getWidth(); $height = $this->getheight() * $ratio; $this->resize($width,$height); } function scale($scale) { $width = $this->getWidth() * $scale/100; $height = $this->getheight() * $scale/100; $this->resize($width,$height); } function resize($width,$height) { $new_image = imagecreatetruecolor($width, $height); imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); $this->image = $new_image; } } ?>
  10. Hi, I'm having to look hard for the right way to do this. Basically the image is sent to the database, and is called to be put in a table, but the images are all different sizes, i would like them all one size, whats the best way to do this with my existing script: <?php error_reporting(E_ALL); ini_set("display_errors", 1); echo '<pre>' . print_r($_FILES, true) . '</pre>'; //This is the directory where images will be saved $target = "/home/users/web/b109/ipg.removalspacecom/images/COMPANIES"; $target = $target . basename( $_FILES['upload']['name']); //This gets all the other information from the form $company_name=$_POST['company_name']; $basicpackage_description=$_POST['basicpackage_description']; $location=$_POST['location']; $postcode=$_POST['postcode']; $upload=($_FILES['upload']['name']); // Connects to your Database mysql_connect("***", "***", "***") or die(mysql_error()) ; mysql_select_db("***") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO `Companies` (company_name, basicpackage_description, location, postcode, upload) VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload')") ; echo mysql_error(); //Writes the photo to the server if(move_uploaded_file($_FILES['upload']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['upload']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?>
  11. thanks Muddy!
  12. Hi everyone! I am trying to figure out how to put echoed php results from mySQL database into a table ready for styling to look how i want it too. So far i have got to the point where the results are echoed out but they are not in a good table layout. (under "latest removalspace user's) I want it more structured in my table. I have found out how to create the table but just not been able to work out how to fit the echo's in without snytax errors??? the "new" table that i want to use is near the end of the script. <?php // Make a MySQL Connection mysql_connect("***", "***", "***") or die(mysql_error()); mysql_select_db("***") or die(mysql_error()); // Retrieve all the data from the "example" table $result = mysql_query("SELECT company_name, location, postcode, basicpackage_description, premiumuser_description, upload FROM Companies") or die(mysql_error()); // store the records into $row array and loop through while ( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ) { // Print out the contents of the entry echo "Name:\r".$row['company_name']; echo "\r\rLocation:\r".$row['location']; echo "\r\rPostcode:\r".$row['postcode']; echo "\r\nBasic Users:\r".$row['basicpackage_description']; echo "\r\nPremium Users:\r".$row['premiumuser_description']; echo "\r\nlogo:\r".$row['upload']; echo "<img src=\"http://www.removalspace.com/images/COMPANIES" . $row['upload'] . "\" alt=\"logo\" />"; echo "<table> <tr><th>Comppany Name</th><th>Location</th><th>Postcode</th><th>Basic Members</th><th>Upgraded Users</th><th>Company Logo</th></tr> <tr><td></td><td></td><td></td><td></td><td></td><td></td></tr>"; } ?>
  13. i have this so far, it shows all of the table, which is what i want all except the images i've had a look for a possible answer and added the path to the image folder on my server but it doesn't seem to work, how can i get this to show the images from the folder on the server? <?php // Make a MySQL Connection mysql_connect("server", "user", "password") or die(mysql_error()); mysql_select_db("my_DB") or die(mysql_error()); // Retrieve all the data from the "example" table $result = mysql_query("SELECT company_name, location, postcode, basicpackage_description, premiumuser_description, upload FROM Companies") or die(mysql_error()); // store the records of the "TABLENAME" table into $row array and loop through while ( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ) { // Print out the contents of the entry echo "details: ".$row['details']; echo "<img src=\"/home/users/web/b109/ipg.removalspacecom/images/COMPANIES".$row['image1']."\" alt=\"name\" />"; } ?>
  14. no it's not empty? it has the actual name of the .jpg file. in this case 360mainhead.jpg in the table: http://www.removalspace.com/index.php it should have the attached image showing instead
  15. My photo files are not being displayed in my table? They get sent to the mySQL database, then the server and it does grab all the other variables in the table and displays them, but the .jpg's are not shown, instead theres just the file name?? <?php error_reporting(E_ALL); ini_set("display_errors", 1); echo '<pre>' . print_r($_FILES, true) . '</pre>'; //This is the directory where images will be saved $target = "/home/users/web/b109/ipg.removalspacecom/images/COMPANIES"; $target = $target . basename( $_FILES['upload']['name']); //This gets all the other information from the form $company_name=$_POST['company_name']; $basicpackage_description=$_POST['basicpackage_description']; $location=$_POST['location']; $postcode=$_POST['postcode']; $upload=($_FILES['upload']['name']); // Connects to your Database mysql_connect("server****", "username***", "password****") or die(mysql_error()) ; mysql_select_db("DB") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO `Companies` (company_name, basicpackage_description, location, postcode, upload) VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload')") ; echo mysql_error(); //Writes the photo to the server if(move_uploaded_file($_FILES['upload']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['upload']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?> "upload" is the variable that isnt displaying in my table how i want it to? Have you guys any ideas how to get it displayed correctly?
  16. right okay.. thanks BUT the problem was the fact that the variables were being put into my table in the wrong order.
  17. The echoed error is this: Array ( [upload] => Array ( [name] => 360mainhead.jpg [type] => image/jpeg [tmp_name] => /tmp/php4eoXyy [error] => 0 => 15625 ) ) Column count doesn't match value count at row 1The file 360mainhead.jpg has been uploaded, and your information has been added to the directory
  18. the folder is in my filemanger on my host's control panel, i thought that's where it had to be sent? I've selected topic not solved as now the other varibales of my form are not being upadted in mySQL? but the image is being sent to the folder just fine??? here's the form code again: <form enctype="multipart/form-data" action="basicpackage-send.php" method="POST"> Compnany Name:<br /> <input type="text" name="company_name" id="company_name"><br> Company Description:<br /> <input type="text" name = "basicpackage_description" id="basicpackage_description"><br> Location:<br /> <input type="text" name = "location" id="location"><br> Postcode:<br /> <input type="text" name = "postcode" id="postcode"><br> Company Logo/Photo:<br /> <input type="file" name="upload" id="upload"><br> <input type="submit" value="Add"> </form> php code: <?php error_reporting(E_ALL); ini_set("display_errors", 1); echo '<pre>' . print_r($_FILES, true) . '</pre>'; //This is the directory where images will be saved $target = "/home/users/web/b109/ipg.removalspacecom/images/COMPANIES"; $target = $target . basename( $_FILES['upload']['name']); //This gets all the other information from the form $company_name=$_POST['company_name']; $basicpackage_description=$_POST['basicpackage_description']; $location=$_POST['location']; $postcode=$_POST['postcode']; $upload=($_FILES['upload']['name']); // Connects to your Database mysql_connect("host", "username", "password") or die(mysql_error()) ; mysql_select_db("DBname") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO `Companies` VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload')") ; //Writes the photo to the server if(move_uploaded_file($_FILES['upload']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['upload']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?> Before the upload bit was created, the other parts of the form went straight in to mySQL on testing??
  19. it's okay i've had a look. i wasnt using the correct path, which i am now. Thank you for all your help!!
  20. there was a 'photo' on line 16 but i changed that now to 'upload' the error messages are these: "Array ( [upload] => Array ( [name] => 360mainhead.jpg [type] => image/jpeg [tmp_name] => /tmp/phpe1KDpI [error] => 0 => 15625 ) ) Warning: move_uploaded_file(/home/users/web/b109/ipg.removalspacecom360mainhead.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /hermes/bosweb25a/b109/ipg.removalspacecom/basicpackage-send.php on line 26 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpe1KDpI' to '/home/users/web/b109/ipg.removalspacecom360mainhead.jpg' in /hermes/bosweb25a/b109/ipg.removalspacecom/basicpackage-send.php on line 26 Sorry, there was a problem uploading your file." how do i change permissions?
  21. thank you for that help. where does this "upload" photo/picture go to? After just testing out the new code i'm getting these error messages: "Array ( [upload] => Array ( [name] => 360mainhead.jpg [type] => image/jpeg [tmp_name] => /tmp/phpINBhZP [error] => 0 => 15625 ) ) Notice: Undefined index: photo in /hermes/bosweb25a/b109/ipg.removalspacecom/basicpackage-send.php on line 16 Warning: move_uploaded_file(/home/users/web/b109/ipg.removalspacecom360mainhead.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /hermes/bosweb25a/b109/ipg.removalspacecom/basicpackage-send.php on line 26 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpINBhZP' to '/home/users/web/b109/ipg.removalspacecom360mainhead.jpg' in /hermes/bosweb25a/b109/ipg.removalspacecom/basicpackage-send.php on line 26 Sorry, there was a problem uploading your file." It looks like it's having trouble sending it to the server but i have permissions to do this as i've contacted my host's tech support to clear it up? i'm told it just goes to the root directory of my server.
  22. update from my host's tech support: " Hello, Thank you for contacting Support. On our platform, root is the home directory path. You can upload the image files into the root directory of your account. If you are using any script, then you can use the home directory path: /home/users/web/b109/ipg.removalspacecom . Thank you! Sincerely, Lakeshia Sidwick Customer Support" is this the path i need to put in my script for the images to go to or not? do i create a folder here?
  23. Scootstah, adding that in my script returns this: "Array ( [upload] => Array ( [name] => Zodiac_Sign_Tattoo___Aquarius_by_MPtribe.jpg [type] => image/jpeg [tmp_name] => /tmp/phpfXyUCg [error] => 0 => 26389 ) ) Notice: Undefined index: photo in /hermes/bosweb25a/b109/ipg.removalspacecom/basicpackage-send.php on line 9 Notice: Undefined index: photo in /hermes/bosweb25a/b109/ipg.removalspacecom/basicpackage-send.php on line 16 Notice: Undefined index: photo in /hermes/bosweb25a/b109/ipg.removalspacecom/basicpackage-send.php on line 26 Sorry, there was a problem uploading your file. " The form code is this: <form enctype="multipart/form-data" action="basicpackage-send.php" method="POST"> Compnany Name:<br /> <input type="text" name="company_name"><br> Company Description:<br /> <input type="text" name = "basicpackage_description"><br> Location:<br /> <input type="text" name = "location"><br> Postcode:<br /> <input type="text" name = "postcode"><br> Company Logo/Photo:<br /> <input type="file" name="upload"><br> <input type="submit" value="Add"> </form> Thanks
×
×
  • 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.