Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,186,997 members, 7,931,439 topics. Date: Monday, 26 August 2024 at 05:01 AM |
Nairaland Forum / Science/Technology / Webmasters / Inserting Picture(image) Into An Application Form (931 Views)
Inserting Ads (adsense, Buzzcity, Admob And Inmobi) To SMF Wap2 (mobile Version) / Inserting Adsense Into My Website / How To Upload An Image Into Mysql Database (2) (3) (4)
(1) (Reply)
Inserting Picture(image) Into An Application Form by scottman(m): 4:41pm On Sep 29, 2009 |
Hello forks, Anyone with tips or codes that can allow me integrate image into form? As in application form. I am using Dreamwver/php and mysql. Thanks |
Re: Inserting Picture(image) Into An Application Form by yawatide(f): 5:46pm On Sep 29, 2009 |
You calling us an eating utensil? Anyways, I am sure google can come up with something for you. Writing the full code on here will be rather laborious, and hard to follow. |
Re: Inserting Picture(image) Into An Application Form by ugojamali(m): 1:24am On Sep 30, 2009 |
Are you talking about uploading images or inserting them in the form like the logo we see at the header of an application form? A web based form cannot contain a picture unless it is a form that has to be printed out and resubmitted by your intended users. other than that a web based form can only contain nothing but form fields. If you are talking about users being able to upload their pictures with the form then i can help you with that. First, write your HTML form. In the form include a FILE UPLOAD button by writing the following code within your form: <input type="file" name="fileField" id="fileField" /> Be sure your form has attribute enctype="multipart/form-data" otherwise the file upload will not work. Now write the PHP for the upload: <?php $uploaddir = '/var/www/uploads/'; $uploadfile = $uploaddir . basename($_FILES['fileField']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['fileField']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "The file could not be uploaded!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?> The above script will upload the file with the form. I'm assuming you know how to submit your form to the database. If you require more help please indicate. Ugo |
(1) (Reply)
Help With Kaysys.com / Website For Your Business at a very affordable rate / 21st Century Aaua- So Properly Called Incompetence
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |