my html file contains
<input type=\"file\" name=\"file\" />

inmy cgi, i do
$query = new CGI;
$w = $query->param('file');
print "file: $w";

instead of printing "file: C:\test"  it is only printing "file: test"
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

perlperlAuthor Commented:
if the file is c:\test\eval.doc
then it only prints eval.doc
it is not printing complete path
perlperlAuthor Commented:
strange if i run on host A where apache is installed, i have thi sissue, but when i run on different host B, it prints complete path.....
perlperlAuthor Commented:
this is something i found out

if i write c:\test\eval.doc  then it prints evail.doc
if i give  :\test\eval.doc  then it prints ":\test\eval.doc"
it does not like if there is c: or d:  why??
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

perlperlAuthor Commented:
1 more thing i tried

<input type=text name=user size=20/>
<input type="file" name="filename" />

in CGI
$query = new CGI;
$w = $query->param('filename');
$n  = $query->param('user');
print "file: $w , size = $s <br>";
print "name: $n <br>";
exit 0;

if i give "C:\test" for user, it prints "c:\user"
but if i give "c:\test\eval.doc" for file, it only prints eval.doc
perlperlAuthor Commented:
i tried using get to see what the form is sending....
on the url i saw

which means the form itself is not sending the complete path................
check your browser, not a web server or CGI problem

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
perlperlAuthor Commented:
well, it worked after adding these two lines

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.