Forums

PHP

This topic is locked

return button

Posted 09 Sep 2006 23:04:38
1
has voted
09 Sep 2006 23:04:38 pete spencer posted:
I have a simple php upload form
<pre id=code><font face=courier size=2 id=code> ?php
$target = "upload/";
$target = $target . basename( $_FILES['uploaded']['name']);
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded";
}
else {
echo "Sorry, there was a problem uploading your file.";
}
?&gt;</font id=code></pre id=code>

How would I insert a back button after the file is uploaded, so it returns to the start?

Replies

Replied 11 Sep 2006 17:41:25
11 Sep 2006 17:41:25 Roddy Dairion replied:
Put this in the if statement.
<pre id=code><font face=courier size=2 id=code>
echo "&lt;input type=\"button\" name=\"button\" value=\"back\" onclick=\"javascript:history.go(-1)\" /&gt;";
</font id=code></pre id=code>

Reply to this topic