this is weird, I have form and on this form three file uploads
and submit button, when i change the button to image (so it looks better than this old thing on my website) it does not upload the files

The button however works 100%, am i missing something here?

<form name="newad" method="post" enctype="multipart/form-data"  action="">
<table> 	
<tr>
<td height="120"><p>
  <input type="file" name="image1">
</p>
  <p>
    <input type="file" name="image2">
  </p>
  <p>
    <input type="file" name="image3">
</p></td>
</tr> 	
<tr>
  <td><input name="Submit" type="image" value="Upload image"  src="images/button_sub2.png"></td>
</tr>
<tr>
<td><input name="Submit" type="submit" value="Upload image"></td>
</tr> 
</table>	 
</form>

i dont want to use the normal button, i already did the website in iamge buttons, why does it not work though ?

You want this:

<input type="image" src="blah.png">

You want this:

<input type="image" src="blah.png">

look at line 15 in my code , it is there already, does not work though

<td><input name="Submit" type="image" value="Upload image"  src="images/button_sub2.png"></td>
<button type="submit" name="button1" value=" ">
<img src="images/button_sub2.png" width="32" height="32" alt="submit" border="0" />
</button>

or style the submit button

input[type=submit] { background:url('input.gif'); }
input:hover[type=submit] { background:url('input.gif') green; }

look at line 15 in my code , it is there already, does not work though

<td><input name="Submit" type="image" value="Upload image"  src="images/button_sub2.png"></td>

That is indeed odd.
Can you browse to http://yourwebsite/images/button_sub2.png and see the image that way? Also try removing value="Upload image"

In which browser you are checking?

IE .. i know it has issues and image buttons dont work for $_POST

It is to upload images to server, then store names in Mysql, that all works fine but the button looks like we stuck in the 80's ...lol
Wanted to use one that doesnt stick out like it doesnt belong there, so i did this as temp solution

<input name="Submit" type="submit" value="Submit" style="font-family:Stylus BT; font-size:medium;
font-style:bold; text-align:left; background:#000; border:0; color:#fff; width:5em" />

some of the code like BOLD in there does nothing so im messing around, it looks exactly like the image buttons i have though.

you can set the background of the button using a little css

<input type="submit" style="background-image: url(images/button_sub2.png);" />
commented: You're only a year late... no big deal. +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.