Jump to content

image as submit


contra10

Recommended Posts

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

Link to comment
Share on other sites

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'])) {
?>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.