Any body help me to get image name in save page

I have <img> tag for image. i want this <img> name is transfer to save.php using <input type "file"> any body help me
I want to get image name In <img> tag image name.
my code is

index.php

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

<input type="file" name="userfile" id="userfile" >


my save.php is

$webimagename=$_FILES['userfile']['name'];
echo $webimagename;


but i am not getting any body help me

Hello, take 5 minutes (and I am saying a lot) to read what file upload is (e.g. http://php.net/manual/en/features.file-upload.php or http://php.net/manual/en/features.file-upload.php was the first two searching in Google). As you will realize in less than a minute your code doesn't make any sense. [“name”] is the name of the file as it were in user pc. Now that took me more than a minute to write , I guess that it took you also more than a minute to ask , while all of that could have been avoided if you have read a minute . So the question that I really don't have any answer at all is ... why ?

Be a part of the DaniWeb community

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