English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories







what do i put in the onSubmit attribute to take the uploader back to my home page?

2007-01-31 04:14:49 · 2 answers · asked by tn5421 3 in Computers & Internet Programming & Design

if ($handle->uploaded) {
$handle->file_new_name_body = 'image_resized';
$handle->image_resize = true;
$handle->image_x = 100;
$handle->image_ratio_y = true;
$handle->process('/home/user/files/');
if ($handle->processed) {
echo 'image resized';
$handle->clean();
} else {
echo 'error : ' . $handle->error;
}
}
?>

2007-01-31 04:17:36 · update #1

also, is the default language for events like 'onSubmit' Javascript?

2007-01-31 04:28:39 · update #2

2 answers

in the php script put

header("Location: http://www.example.com/");

to redirect the browser.

RJ

2007-01-31 04:23:56 · answer #1 · answered by Anonymous · 1 0

1. yes, you should be using a javascript text in the "onsubmit" .
2. you could either use a header statement to redirect you back to the index page on the upload.php page -or- some imbeded javascript like

echo "";

2007-01-31 06:49:09 · answer #2 · answered by Thomas H 3 · 1 0

fedest.com, questions and answers