Member Avatar

Hello, anyone have any idea on how to display selected image in popup box? and then upload. Currently, the basic way is to display the selected image in a <div> tag, and i want to change and display the image in popup/dialog/confirmation box. Below is the code to select image, and display the preview image in <div> <div class="item form-group"> <label class="control-label col-md-1 col-sm-1 col-xs-12" > </label> <div class="col-md-2 col-sm-12 col-xs-12"> <label class="btn btn-primary btn-upload" for="img" data-toggle="tooltip" title="Upload image file">Select Image</label> <input class="sr-only" id="img" name="img" type="file" accept="image/*"> </div> </div> <div class="item form-group"> <label class="control-label col-md-1 col-sm-1 col-xs-12"> </label> <div class="col-md-2 …

Member Avatar
+0 forum 3
Member Avatar

Hi! I got this image uploading script for my website, but i don't know if it's gonna work or not. I just wanted to ask if someone could take a look at it, and tell me if the code looks okay and ready to go. Thx in advance. [CODE] <?php include 'db_connect.php'; $uploadSubmit = mysql_real_escape_string($_POST['imageSubmit']); if ($uploadSubmit) { if ($_FILES['image']) { $contents = file_get_contents($_FILES['image']['tmp_name']); if (stristr($contents, "<?php") || stristr($contents, "system(") || stristr($contents, "exec(") || stristr($contents, "mysql") || stristr($contents, "include(") || stristr($contents, "require(") || stristr($contents, "include_once(") || stristr($contents, "require_once(") || stristr($contents, "echo'") || stristr($contents, 'echo"')) { echo 'Are you really trying …

Member Avatar
+0 forum 3
Member Avatar

hai, I used FCKEditor in my Application. But when i browse the server any time i get a error window. And the Error as follows: The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /SchoolAdmin/fckeditor/editor/dialog/~/fckeditor/ How Can I fix this problem. Thanks in Advance, Sreevidya

+0 forum 0
Member Avatar

I have this script that I am using that work to upload a file and to make sure the file is either jpg, jpeg, or gif. However, I want to restrict the user with the image width no larger than 150px. Is there an easy way to implement in the code I already have below? [CODE=php] if(isset($_POST['imageInsert'])) { $current_image=$_FILES['image']['name']; $imageextension = substr(strrchr($current_image, '.'), 1); if (($imageextension!= "jpg") && ($imageextension != "jpeg") && ($imageextension != "gif")) { die('Unknown extension. Only jpg, jpeg, and gif files are allowed. Please hit the back button on your browser and try again.'); } $time = …

Member Avatar
+0 forum 5
Member Avatar

Hi, I am looking for some help with my script, since only half of it is working. The image path will not be put in the database for some reason and when I process the form all I get is white space: [CODE] $reg_errors = array(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ((isset($_GET['packageID'])) && (is_numeric($_GET['package_ID']))) { $packageID = (int) $_GET['packageID']; } elseif ((isset($_POST['packageID'])) && (is_numeric($_POST['packageID']))) { $packageID = (int) $_POST['packageID']; } else { echo 'Sorry No Package ID'; include ('../includes/footer.php'); exit(); } if (preg_match ('/^[A-Z '.-]{2,100}$/i', $_POST['companyname'])) { $companyName = mysqli_real_escape_string ($dbc, strip_tags($_POST ['companyname'])); } else { $reg_errors['companyname'] = 'Enter …

Member Avatar
+0 forum 1
Member Avatar

i need to upload images in imagegallery throuhg plugin in '/wp-content/images' folder. for that i need to set this path in 'Miscellaneous Settings' given in wordpress. if i give '/wp-content/images' there, all the images i upload in wordpress will be going tho this folder.. otherwise if i give the option "Organize my uploads into month- and year-based folders" then the images uploaded willbe going to seperate folders but retriving that is difficult... how can i solve this....

Member Avatar
+0 forum 4
Member Avatar

Hi, I am currently developing a Chrome extension to upload photos to TwitPic, but am receiving an error in the response: <?xml version="1.0" encoding="UTF-8"?> <rsp stat="fail"> <err code="2" msg="Image type not supported. GIF, JPG, & PNG only" /> </rsp> My request looks like this: [CODE]--345823569845694578678 Content-disposition: form-data; filename="image.png"; name="media" Content-Type: image/png Content-Transfer-Encoding: base64 data:image/png;base64,iVBORw0KGgoAAAAN ... --345823569845694578678 Content-disposition: form-data; name="username" <twitter_username> --345823569845694578678 Content-disposition: form-data; name="password" <twitter_password> --345823569845694578678 Content-disposition: form-data; name="message" hello world --345823569845694578678 [/CODE] The long number in the above is the boundary string. The image data is in base64 ( data:image/png;base64,iVBORw0KGgoAAAAN ... ) and is retrieved from a canvas element. …

+0 forum 0
Member Avatar

Hello people, I want to find exactly how I would upload an image to a database from a JSP web form.The form would have to support other formats as well such as text and should cater for the image upload as well.

Member Avatar
+0 forum 1

The End.