|
pagolina
|
hello every body!
i have a form, i want client to upload there passport (image) so i use a file upload field (form object) and yes they can brows for file and upload but what i see is the path and the image did not display for them to view it on the form beform submitting it. pls i want the image to display, also i want to choose the file types and size b/4 the form will accept it, how do i get that?
i make use of php/mysql imagine you are bulding a web form that somebody can upload image what do you do?
|
|
|
|
|
|
yawa-ti-de (f)
|
the image won't display unless u use some javascript function, via an event (like onchange or whatever) to trigger once the image link is in the text field.
For file type and size, I believe you do that within the php. There are functions (ready-made) that do that already. I forget which library it is, though I think it is gd extension. Check it out.
Good luck!
|
|
|
|
|
|
pagolina
|
ya-wa-ti-de, thank you very much for your contribution
is there any place i can get prewriten javascript for that? and how to use it with my form
|
|
|
|
|
|
*dhtml
|
<img id="d" style="display:none"/>
<form> <input type="file" onchange="d.src=this.value;d.style.display='block';"> </form>
Something like that. The remaining yawatide told u already
|
|
|
|
|
|