ThomasJSmart
Programmer
- Sep 16, 2002
- 634
what is wrong with this script cuz i cant see it :-(
what happens is i open a pic with the file browser, then press submit, the screen flashes and nothing else happens. (i can still see the input field & button) i cant see the filename, or "test"
also if i test the file adding a get var ( the get var stays in the url address after i press submit, im sure this isnt right....
cheers,
thomas
I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
Code:
<html>
<head>
<title>test</title>
</head>
<body>
<?
if (isset($_POST['pic']))
{
global $_FILES;
echo $_FILES['pic']['name'];
echo "test";
}
?>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<input type="file" name="file">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
what happens is i open a pic with the file browser, then press submit, the screen flashes and nothing else happens. (i can still see the input field & button) i cant see the filename, or "test"
also if i test the file adding a get var ( the get var stays in the url address after i press submit, im sure this isnt right....
cheers,
thomas
I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!