ReePht
August 14, 2006, 11:22pm
1
Hello, i am having a little trouble…
I have a website where i am going to have a browse button and a upload button… You get theese booring grey buttons that dont fit the design, so i made 2 buttons… I got the Upload button to fit perfectly and functional with this code
<input type="image" src="images/upload.gif" value="Upload" name ="Upload">
But the browse button i dont get to work… The image is located at the folder “images” and the image is named “browse.gif”
This is the code i have…’
<form method="post" enctype="multipart/form-data" action="reg/index2.php">
<INPUT TYPE="file" NAME="userfile">
<input type="image" src="images/upload.gif" value="Upload" name ="Upload">
Any ideas on how to get the browse file in a image?
Thanks
Freddy,
Are you using the same image for the upload button and the browse button? You have the same name value and src listed
<?php
if (isset($_POST['Upload']))
{
go to upload page ...
}
elseif (isset($_POST['browse']))
{
do whatever ...
}
/* Continue with whatever */
?>
<form method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<INPUT TYPE="file" NAME="userfile">
<input type="image" src="images/upload.gif" value="Upload" name ="Upload">
<input type="image" src="images/browse.gif" value="browse" name="browse">
This is a CSS issue, thus wrong forum. But you’ll find all information about it here .
They try to make it hard to style the file upload because of potential tricks you could play on the end user. However, it can be done.
See: http://www.quirksmode.org/dom/inputfile.html
Btw, this belongs in the HTML/CSS forum, not this one.
UFTimmy:
SAME LINK OF DOMINANCE!
Yup, 3 seconds in Google and it’s there.
ReePht
August 15, 2006, 2:48am
7
I dont get it, i dont get it to work… I am real noob when it comes to this…
I hope someone can help…
Freddy,
You’re on the wrong forum. Try reposting your question in the correct forum.
In addition, the phrase “i dont get it to work” does not help us at all. You have to be more specific.