0

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 ?

5
Contributors
7
Replies
18
Views
6 Years
Discussion Span
Last Post by ab_omid
0

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>
0
<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; }

Edited by almostbob: n/a

0

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.

-3

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

<input type="submit" style="background-image: url(images/button_sub2.png);" />
Votes + Comments
You're only a year late... no big deal.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.