In my project i have a problem is:

Without clicking browse button we have to get name using <input type="file">

any body help me to clear this one

<img src="<?php echo $image; ?>" style="width:190px; height:150px;"  />

<input type="file" name="userfile" id="userfile" value="<?php echo "Penguins.jpg"; ?>">

i am not getting the userfile

Recommended Answers

All 3 Replies


this is an intended behaviour of the browser, a website cannot define the file to upload from a client system, otherwise it could be used to steal anything. In any case, the browser works in a sandbox, so you cannot access directly to local resources.

Yes Cereal,
I agree with u..

my doubt is cleared ,,, thanx

You're welcome!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.