contra10 Posted March 5, 2009 Share Posted March 5, 2009 im tryig to get my input to work as an image but its not <input type="image" name="submit" value="submit" src="cooltext414969221.png" onmouseover="this.src='cooltext414969221MouseOver.png';" onmouseout="this.src='cooltext414969221.png';" /></td></tr> </table> </form> <a href="http://localhost/eventfind/">Search by name</a> </center> </div> </div> <div class="meta">Results</div> <div class="storycontent"> <form action="" method="get" enctype="application/x-www-form-urlencoded"> <table height="20" width="450" border="0"id="results"> <tr><td>Results</td></tr> <?php // Connects to your Database mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("registration") or die(mysql_error()); //This code runs if the form has been submitted if(isset($_POST['submit']) ?> i know my php works cause when i use a regular submit button it works Quote Link to comment https://forums.phpfreaks.com/topic/148038-image-as-submit/ Share on other sites More sharing options...
haku Posted March 5, 2009 Share Posted March 5, 2009 You're missing a ) mate. Quote Link to comment https://forums.phpfreaks.com/topic/148038-image-as-submit/#findComment-777039 Share on other sites More sharing options...
contra10 Posted March 5, 2009 Author Share Posted March 5, 2009 code is like this <body onload="setCountry();"> <table align="1"> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" > <tr><td align="left" width="100"> <br> Continent: </td><td align="left"> <select name="continent" id="continent" onchange="setCountry();" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;"> <option value="Africa">Africa</option> <option value="Asia">Asia</option> <option value="Europe">Europe</option> <option value="North America">North America</option> <option value="Oceania">Oceania</option> <option value="South America">South America</option> </select> </td></tr> <tr><td><br></td></tr> <tr><td align="left"> Country: </td> <td align="left"><select name="country" id="country" width="5" onchange="setStates();" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; width: 230px; background-color: #72A4D2;"> <option value="">Please select a country</option> </select> </td></tr> <tr><td><br></td></tr> <tr><td align="left"> State/Province:</td><td align="left"> <select name="state" id="state" onchange="setCities();" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;"> <option value="">Please select a State/Province</option> </select> </td></tr> <tr><td><br></td></tr> <tr><td align="left"> City: </td> <td align="left"><input type="city" name="city" size="30" maxlength="50" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;"> </td></tr> <br> <tr><td align="left"> <b>Category:</td> <td align="left"> <select name="eva" id="eva" onchange="setevent();"> <option value="" selected>Select an Option</option> <option value="arts">Arts</option> <option value="cause">Cause</option> <option value="cultural">Cultural</option> <option value="entertainment">Entertainment</option> <option value="education">Education</option> <option value="fashion">Fashion</option> <option value="justforfun">Just for Fun</option> <option value="outdoors">Outdoors</option> <option value="party">Party</option> <option value="political">Political</option> <option value="private">Private</option> <option value="sport">Sport</option> <option value="cause">Other</option> </select> <select name="event" id="event" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;"> <option value=""></option> </select> </td></tr> <tr><td> <style type="text/javascript"> <input type="image" name="submit" value="submit" src="cooltext414969221.png" onmouseover="this.src='cooltext414969221MouseOver.png';" onmouseout="this.src='cooltext414969221.png';"/> </style></td></tr> </form> </table> <a href="http://localhost/eventfind/">Search by name</a> </center> </div> </div> <div class="meta">Results</div> <div class="storycontent"> <form action="" method="get" enctype="application/x-www-form-urlencoded"> <table height="20" width="450" border="0"id="results"> <tr><td>Results</td></tr> <?php // Connects to your Database mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("registration") or die(mysql_error()); //This code runs if the form has been submitted if(isset($_POST['submit']) and ($_POST['continent']) and ($_POST['country']) and ($_POST['state']) and ($_POST['eva']) and ($_POST['event'])) { ?> Quote Link to comment https://forums.phpfreaks.com/topic/148038-image-as-submit/#findComment-777057 Share on other sites More sharing options...
PFMaBiSmAd Posted March 5, 2009 Share Posted March 5, 2009 http://us3.php.net/manual/en/faq.html.php#faq.html.form-image http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.4.1 Quote Link to comment https://forums.phpfreaks.com/topic/148038-image-as-submit/#findComment-777068 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.