I would like some help on my script I have the for my index.php
////
<html>
<head>
<!-- Include the javascript -->
<script src="multifile_compressed.js"></script>
</head>
<body>
<!-- This is the form -->
<form enctype="multipart/form-data" action="upload.php" method = "post">
<!-- The file element -- NOTE: it has an ID -->
<input id="my_file_element" type="file" name="file_1" >
<input type="submit">
</form>
Files:
<!-- This is where the output will appear -->
<div id="files_list"></div>
<script>
<!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->
var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 3 );
<!-- Pass in the file element -->
multi_selector.addElement( document.getElementById( 'my_file_element' ) );
</script>
</body>
</html>
//////
For my upload.php
but this script is for only one image
///
<?php
if(isset($_POST['submitimg'])){
if (isset ($_FILES['new_image'])){
$imagename = $_FILES['new_image']['name'];
$source = $_FILES['new_image']['tmp_name'];
$target = "../Dphotos/".$imagename;
move_uploaded_file($source, $target);
$imagepath = $imagename;
$save = "../Dphotos/" . $imagepath; //This is the new file you saving
$file = "../Dphotos/" . $imagepath; //This is the original file
list($width, $height) = getimagesize($file) ;
$modheight = 350;
$diff = $height / $modheight;
$modwidth = $width / $diff;
$tn = imagecreatetruecolor($modwidth, $modheight) ;
$image = imagecreatefromjpeg($file) ;
imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ;
imagejpeg($tn, $save, 100) ;
$save = "../Dphotos/thumbs/" . $imagepath; //This is the new file you saving
$file = "../Dphotos/" . $imagepath; //This is the original file
list($width, $height) = getimagesize($file) ;
$modheight = 100;
$diff = $height / $modheight;
$modwidth = $width / $diff;
$tn = imagecreatetruecolor($modwidth, $modheight) ;
$image = imagecreatefromjpeg($file) ;
imagecopyresampled($tn, $image, 0, 0, 0, 0,$modwidth, $modheight, $width, $height) ;
imagejpeg($tn, $save, 100) ;
echo "Large image: <img src='../Dphotos/".$imagepath."'>
";
echo "Thumbnail: <img src='../Dphotos/thumbs/".$imagepath."'>";
}
}
?>
/////
Please help thanks
ereg_replace issue
hi there peoplei have this code happening with regards to my wamp server. is this something that can be sorted out? would this happen on a normal remote server that has lamp on with the necessary
[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysql database. Something is wrong because I am getting the following error:Warning:
need help in update query
hi i have a dynamic form. i need help in how can i use update query when values from dynamic form get pass to php file.currently when i press submit it displays this and does not update fieldsCode:
phpmailer class & pop.gmail.com?
Code: <?php $mail->IsSMTP();$mail->Host = "pop.gmail.com";$mail->Port = 995;$mail->SMTPAuth = true;$mail->Username =
How to add functionality to a simple php calender?
Hello everyone, I have just finished creating a simple php calander. Can someone point me into the right direction as to what I need to do to begin to give the calender functionality?For exampleI
simple php table loop
Hi all,I've the following code <?php // Create category options $query = "SELECT * FROM categories ORDER BY category ASC"; $result = mysql_query
Need help in Generating Combinations
Need help generating all possible combination of names in an arrayLets say i have the following array:$names = array("jack","john","Adam","Mike");Now my goal is
Display search result
Hi!I have a SQL database with information about albums and track (music). This is where the user inputs a search term(entersearch.php): Code: <form name="form"
LOOPing Problem
Hello All!The following code loops through the data and displays the data accordingly. My problem is that the $listPR->HoursWorked; array repeats itself. The foreach($listLocations as
Problem Dereferencing
With these types and tables: