
darknessmdk
Members-
Posts
62 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
darknessmdk's Achievements

Member (2/5)
0
Reputation
-
I don't know, i'll have to check that out
-
Does anyone know if it is possible to install uploadprogress on a godaddy shared hosting account? I am trying to get jQuery progressbar to work and i need this installed.
-
Unfortunately my client wants the files on his hosting. Is there some way that JavaScript can resize the image and have php just copy and save it?
-
I was looking for a new way to build a CMS photo gallery for a client's site. The client has no photo editing capabilities and just wants to upload photos he takes with his 10 mega pixel camera. Obviously these will be large files dimension wise so I was looking for a way to resize these images through javascript or by php. I have made my own script using php but It uses too much server memory and fails on images larger than 2MB. I found the jcrop javascript and thought this was my holy grail, but all the tutorials i've found have the php doing the actual resizing of the image. Is there anyway to have a javascript do the image resize and just have the php copy and save it?
-
Hi everyone, I've been looking on the net for a script that would allow me to fade in/out a series of images using javascript/dhtml. All the scripts I have found are out dated and are not browser compatible, can anyone point me in the right direction?
-
[SOLVED] Passing data from child window to parent window
darknessmdk replied to darknessmdk's topic in Javascript Help
I had wanted to do this with a loop, but if it can't be done I'll use this method, Thank you -
[SOLVED] Passing data from child window to parent window
darknessmdk replied to darknessmdk's topic in Javascript Help
Well there will be more than two radio buttons, I'm just using two for testing right now. There will be 14 radio buttons total and the user has to pick one. The problem is I can't seem to capture the value for the radio buttons. I am assuming this is because they all have the same name in the form. I have no problem capturing values for text fields. -
Hi all, Heres my problem, I am opening a popup window from the parent page, the popup contains a few radio buttons. I am having problems passing the value of the selected radio button to a field on the parent page. I recieve "undefined" in the text field on the parent page. The script I am using works perfectly if all the fields in the popup window are named differently, however with the array of radio buttons they can't be named differently. Heres the code for the parent window <html> <head> <title>Master Form Page</title> <script language="JavaScript" type="text/javascript"> var Fwin = null; Fwin_Wid = 300; Fwin_Hgt = 220; Fwin_Left = (screen) ? screen.width/2 - Fwin_Wid/2 : 100; Fwin_Top = (screen) ? screen.availHeight/2 - Fwin_Hgt/2 : 100; function openFormWin(url) { Fwin = open(url,'Fwin','width='+Fwin_Wid+',height='+Fwin_Hgt+',left='+ Fwin_Left+',top='+Fwin_Top+',status=0'); setTimeout('Fwin.focus()',100); } </script> </head> <body> <br> <a href="#" onClick="openFormWin('buttest.html');return false;">Show Form</a> <br> <form name="mainForm"> Name <input name="buttontemp" type="text"><br> </form> </body> </html> Here is the code for the popup window <html> <head> <title>Pop Up Form</title> <script language="JavaScript" type="text/javascript"> function setMaster() { var mainForm = opener.document.mainForm; var popForm = document.popForm; var currEl; for (var i=0; i<popForm.length; i++) { currEl = popForm[i]; if (mainForm[currEl.name]) { mainForm[currEl.name].value = popForm[currEl.name].value; } } if (opener && !opener.closed) opener.focus(); self.close(); } </script> </head> <body bgcolor="#426498"> <div align="right"><br> <form name="popForm" onSubmit="setMaster()"> name: <input type="radio" name="buttontemp" id="radio" value="Test Value"> <br> <input type="radio" name="buttontemp" id="radio" value="Test Value22"> <br> <input type="submit" value="DONE"> </form> </div> </body> </html>
-
widox, I am having a problem getting the correct data into the database, It only echos one row id number 4 times. hansford, I am storing the values in an array which is why i need "name='list2[]'" the "selected='selected'" is because I want that first option to be the default. If you check my code at the top I already have what you suggested to get the selected value "$checked2 = $_POST['list2'];"
-
Okay, Here the problem, I have a table that is displaying rows from a database, the last column displays dropdown boxes that you can select yes or no, yes enables the account and no disables the account. I am having an issue capturing the data from these dropdown boxes. I am storing the data in an array and using foreach loops, there the code. The update part. <? if ($_POST ['button']=='update'){ $checked = $_POST['id']; $checked2 = $_POST['list2']; foreach($checked as $key => $value){ $scan = mysql_query("SELECT restid FROM restaurants WHERE restid = '$key'"); while($srow = mysql_fetch_array($scan)) { foreach($checked2 as $key2 => $value2){ echo "$value"; $update = mysql_query("UPDATE restaurants SET ractive = '$value2' WHERE restid = '$key'"); } } } if($update == TRUE) { echo "<br><span class='body_text'>Yes, I know this isn't working.</span>"; }else{ echo "<br><span style='color:#FF0000' class='body_text'>We have encountered an error, please try again. </span>"; } } ?> this is the drop down box that is displayed in the form <select name='list2[]' id='list2[]'> <option value='$row[ractive]' selected='selected'>$row[ractive]</option> <option value='Yes' >Yes</option> <option value='No'>No</option> </select>
-
[SOLVED] imagecreatefromjpeg() Memory issue
darknessmdk replied to darknessmdk's topic in PHP Coding Help
No I haven't tried that yet, my host said they raised the memory limit to their max so I didn't bother doing it through php, I will this though. -
I have built a multiple file upload for an image gallery, one of the requirements is to resize any images that exceed a width of 500px or height of 400px, My script works great as long as the files are under 1MB after that I get a half displayed page with this error "Allowed memory size of 20971520 bytes exhausted (tried to allocate 12288 bytes)" and it references the line that imagecreatefromjpeg() is on. I have had my host (hostmysite) raise the memory_limit setting to 20MB, they will go no higher. Any idea why this is an issue with a 1MB jpeg? foreach ($_FILES["photofile"]["error"] as $key => $error) { if($error == UPLOAD_ERR_OK){ $logo = $_FILES['photofile']['name'][$key];; $logo_ext = strtolower(substr($logo,strrpos($logo,"."))); $result = mysql_query("INSERT into gallery(image, caption, section, subsection)VALUES('$image', '$caption', '$section', '$subsection')"); $id=mysql_insert_id(); $tmp_name = $_FILES["photofile"]["tmp_name"][$key]; $name = $_FILES["photofile"]["name"][$key]; $random = rand(1, 6); //:::File Resize:::\\ $uploadedfile = $tmp_name; $src = imagecreatefromjpeg($uploadedfile); // get size of image list($width,$height)=getimagesize($uploadedfile); if ($width > $height) { $target_width=500; $ratio = $target_width/$width; $newwidth = $width * $ratio; $newheight = $height * $ratio; } else { $target_height = 400; $ratio = $target_height/$height; $newwidth = $width * $ratio; $newheight = $height * $ratio; } $tmp=imagecreatetruecolor($newwidth,$newheight); // resize imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height); // save resized //$fname = explode('.', $_FILES["photofile"]["name"]); //$filename = $fname[0] . "resized" . ".jpg"; imagejpeg($tmp,$uploadedfile,100); imagedestroy($src); imagedestroy($tmp); //:::End File Resize:::\\ move_uploaded_file($uploadedfile, "../gallery/photo".$id."".$random."".$logo_ext.""); // Sets permissions 644 chmod("../gallery/photo".$id."".$random."".$logo_ext."", 0644); //$image = "propimg/"; $query2= mysql_query("UPDATE gallery SET image='photo".$id."".$random."". $logo_ext ."' WHERE id = '$id'"); //$checked = $_POST['type2']; //foreach ($checked as $type) { // } } } if($result == TRUE) { echo "<span style='message'>Your photos have been uploaded!</span>"; } else { echo "<span style='error'>There was a problem uploading, Try again</span>"; } }else{ echo ""; } ?>
-
I'm also having a similar issue, however it only happens when I try to upload an image thats 1MB or higher
-
Converting videos to FLVs (like youtube)
darknessmdk replied to darknessmdk's topic in PHP Coding Help
if you could walk me through it that would be great, however I don't have msn messager, do you have aol aim? -
Converting videos to FLVs (like youtube)
darknessmdk replied to darknessmdk's topic in PHP Coding Help
Awesome, How do you install them on the server? I'm guessing you just don't upload them and thats it?