h4r00n Posted August 26, 2009 Share Posted August 26, 2009 Hi, I have a pretty basic seach form with a standard search button. However I want to change the search button to an image. Can anyone advise how this can be done? <form action='search.php' method='GET'> <center> <p><font size="5" style="font-family: Georgia, 'Times New Roman', Times, serif; font-size: 30px; color: #FF7113;">Quick Search</font></p> <p><font size="5" face="sans-serif"> <input style='text' size ='50' name='search' value="e.g. Social Work in Birmingham" onClick="if(this.value == 'e.g. Social Work in Birmingham') this.value='';" /> <input type='submit' name='submit' value='Search' > <br> </font></p> </center> </form> Link to comment https://forums.phpfreaks.com/topic/171878-solved-change-search-button-to-image/ Share on other sites More sharing options...
merck_delmoro Posted August 26, 2009 Share Posted August 26, 2009 Change <input type='submit' name='submit' value='Search'> to <INPUT TYPE="image" SRC="button.gif" VALUE="Search" ALT="Search" NAME="Search"> Link to comment https://forums.phpfreaks.com/topic/171878-solved-change-search-button-to-image/#findComment-906301 Share on other sites More sharing options...
h4r00n Posted August 26, 2009 Author Share Posted August 26, 2009 Hi, thanks for the reply, however I just get text now stating 'Search' I do not get the image nor the button... ? Link to comment https://forums.phpfreaks.com/topic/171878-solved-change-search-button-to-image/#findComment-906309 Share on other sites More sharing options...
h4r00n Posted August 26, 2009 Author Share Posted August 26, 2009 It's ok, its fixed now. Do you know how I can change the size of the image? What code do I use? Also, If I want to insert the image in a div, what code do I need to copy? Link to comment https://forums.phpfreaks.com/topic/171878-solved-change-search-button-to-image/#findComment-906312 Share on other sites More sharing options...
merck_delmoro Posted August 26, 2009 Share Posted August 26, 2009 because you don't have any image created make an image using any picture editor dn change the SRC value from <INPUT TYPE="image" SRC="button.gif" VALUE="Search" ALT="Search" NAME="Search"> to the name of your picture that been create Link to comment https://forums.phpfreaks.com/topic/171878-solved-change-search-button-to-image/#findComment-906314 Share on other sites More sharing options...
merck_delmoro Posted August 26, 2009 Share Posted August 26, 2009 insert height and width to the code Link to comment https://forums.phpfreaks.com/topic/171878-solved-change-search-button-to-image/#findComment-906316 Share on other sites More sharing options...
lostprophetpunk Posted August 26, 2009 Share Posted August 26, 2009 insert height and width to the code Which is this basically... <input type='image' src='imageaddress.png' width='100px' height='20px' name='submit' value='Search' /> Link to comment https://forums.phpfreaks.com/topic/171878-solved-change-search-button-to-image/#findComment-906464 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.