Inserting Picture(image) Into An Application Form

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 22, 2009, 06:34 AM
430683 members and 297825 Topics
Latest Member: GENTLE T
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Webmasters (Moderators: OmniPotens, yawa-ti-de)  |  Inserting Picture(image) Into An Application Form
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: Inserting Picture(image) Into An Application Form  (Read 87 views)
scottman (m)
Inserting Picture(image) Into An Application Form
« on: September 29, 2009, 04:41 PM »

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 Grin
yawa-ti-de (f)
Re: Inserting Picture(image) Into An Application Form
« #1 on: September 29, 2009, 05:46 PM »

You calling us an eating utensil?  Tongue

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.
ugojamali (m)
Re: Inserting Picture(image) Into An Application Form
« #2 on: September 30, 2009, 01:24 AM »

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

 Free Info! : Youtube Free Video : Earn $450 Plus Monthly  Page Source Editor Urgently Needed  Cheap Domain  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.