Php - change Submit button to Image
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 ?
branding4you
Junior Poster in Training
75 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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>
branding4you
Junior Poster in Training
75 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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; }
almostbob
Nearly a Senior Poster
3,303 posts since Jan 2009
Reputation Points: 585
Solved Threads: 403
Skill Endorsements: 7
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.
branding4you
Junior Poster in Training
75 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0