Forum Moderators: coopster

Message Too Old, No Replies

Php and iframes

and onclick events

         

Bswap

4:09 am on Oct 24, 2008 (gmt 0)

10+ Year Member


i have an upload script in an iframe and i need to open a page in a another iframe on the same page after a successful upload and go back in the current frame.

the Script is...

<html>
<head>
<style type="text/css">
body {text-size: x-small;}
</style>
</head>
<?php
if ((($_FILES["file"]["type"] == "image/gif"[smilestopper])
¦¦ ($_FILES["file"]["type"] == "image/jpeg"[smilestopper])
¦¦ ($_FILES["file"]["type"] == "image/pjpeg"[smilestopper]))
&& ($_FILES["file"]["size"] < 1600000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "
";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "
";
echo "Type: " . $_FILES["file"]["type"] . "
";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb
";
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "
";

if (file_exists("upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_...
"upload/" . $_FILES["file"]["name"]);
echo "Upload Successful " . $_FILES["file"]["name"];
}
}
}
else
{
echo "Invalid file";
}
?>

<FORM><INPUT TYPE="BUTTON" VALUE="Go Back"
ONCLICK="history.go(-1)"></FORM>
</html>

the button at the bottom is what i want to use to go back and open the page in the other iframe

dreamcatcher

1:57 pm on Nov 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Bswap,

Looks like this has everyone stuck. Did you have any joy yourself?

dc