Jump to content

Simple Query with results on same page


ValdouaD

Recommended Posts

Hello, I havent changed this code since 2006 I believe so I am a little rusty at making changes to it. But what i would like to do is have my query on the page with my results listed on the same page instead of having ir broken down into 2 different pages.

Here is my form:

<form name="search" action="spage2.php" method="post">
<p align="left" style="margin-top: -1; margin-bottom: -1">
  <span class="style2"><b><font size="2">Search by Zip:</font></b><font size="2">          
  </font>
  <input type="text" name="zipCode" size="20"> 
  <b><font size="2">(example: 01922) 
  </font></b></span></p>
<p align="left" style="margin-top: -1; margin-bottom: -1">
<span style="font-family: Arial, Helvetica, sans-serif"><br>
<font size="2"><b>Search by State:     
</b></font> 
<input type="text" name="state" size="20">
<input type="submit" size="20"> 
<b> <font size="2">(example: NY for New York) </font></b></span>
</form>

 

And here is my the code from the results page:

// Page two, search and display 
$connect = mysql_connect("localhost", "XXXX", "XXXX");  
$db = mysql_select_db("database_name", $connect);  
$sql = "SELECT * 
        FROM STOREDATA 
        WHERE State = '".$_POST['state']."' 
        OR ZIP_Code = '".$_POST['zipCode']."'";  
$result = mysql_query($sql);  
$rows = mysql_num_rows($result);  
if($rows > 0) {  
      echo "<p><center></p>
<table border=\"1\">  
            <th align=\"center\newstyle\">Name</th> 
            <th align=\"center\">City</th> 
            <th align=\"center\">State</th> 
            <th align=\"center\">Sales Phone</th>"; 

    while($row=mysql_fetch_array($result)) {  
        echo "<tr><center>
                <td align=\"center\" class=\"newstyle\">".$row['Name']."</td>
                <td align=\"center\" class=\"newstyle\">".$row['City']."</td>
                <td align=\"center\" class=\"newstyle\">".$row['State']."</td>
                <td align=\"center\" class=\"newstyle\">".$row['Sales_Phone']."</td>
              </tr>";  
    }  
}  
else {  
    echo "No results found";  
}  
mysql_close($connect); ;

 

Instead of having a separate results page I would like to move them all into one page. This is possible isnt it?

 

ANd help or suggestions would be greatly appreciated.

 

Thanks! :-\

 

 

 

Link to comment
Share on other sites

Very possible.

 

 

 

if (isset(submit)) {  //This checks to see if the submit button is set

//process query

} else {

//Show form  .......
<FORM name="search"  action="<?php echo $_SERVER['PHP_SELF']; ?> "  method="post" >  //This calls itself when the submit if clicked.

...........

 

 

}

Link to comment
Share on other sites

Try this.  As I do not have your CSS file, I cannot get the styling exact, but you should be able to get through that.  Also, define all of your classes in the CSS file and replace

 

<p align="left" style="margin-top: -1; margin-bottom: -1">

 

with

 

<p class="whatever">

 

 

//CSS file

.whatever {
text-align= left;
margin-top: -1;
margin-bottom: -1
}

 

 

This will make your code easier to read and the formatting easier to change when ever you need to.

 

 

<body>
	<?php
	 	if(!isset($_POST['submit'])){
	?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
	<p align="left" style="margin-top: -1; margin-bottom: -1">
	<span class="style2"><b><font size="2">Search by Zip:</font></b>
    <input type="text" name="zipCode" size="20"> 
	<b><font size="2">(example: 01922)  </font></b></span></p>
    <p align="left" style="margin-top: -1; margin-bottom: -1">
    <span style="font-family: Arial, Helvetica, sans-serif"><br>
    <font size="2"><b>Search by State:     </b></font> 
	<input type="text" name="state" size="20">
	<b> <font size="2">(example: NY for New York) </font></b></span>
	<input type="submit" name="submit" value="Go">
</form> 

	<?php 
		} else {
		// Page two, search and display 
$connect = mysql_connect("localhost", "root", "sysadmin");  
$db = mysql_select_db("test", $connect);  

$sql = "SELECT * FROM STOREDATA WHERE State = '".$_POST['state']."' OR ZIP_Code = '".$_POST['zipCode']."'";  

$result = mysql_query($sql);  
$rows = mysql_num_rows($result);  
if($rows > 0) {  
	  echo "<p><center></p>
			<table border=\"1\">  
			<th align=\"center\newstyle\">Name</th> 
			<th align=\"center\">City</th> 
			<th align=\"center\">State</th> 
			<th align=\"center\">Sales Phone</th>"; 

	while($row=mysql_fetch_array($result)) {  
		echo "<tr><center>
				<td align=\"center\" class=\"newstyle\">".$row['Name']."</td>
				<td align=\"center\" class=\"newstyle\">".$row['City']."</td>
				<td align=\"center\" class=\"newstyle\">".$row['State']."</td>
				<td align=\"center\" class=\"newstyle\">".$row['Sales_Phone']."</td>
			  </tr>";  
	}  
}  
else {  
	echo "No results found";  
}  
mysql_close($connect); ;
		}
	?>
</body>

Link to comment
Share on other sites

Siric,

 

Ok, now this just got totally strange. i copied and pasted your code into the area of where i wanted this to show up and now when I test it out I get a blank page. I skipped fixing teh CSS for now I can always change that later. When I go and view its source it stops at line 5! This is extremely odd!

Link to comment
Share on other sites

Ok, I found some mistakes when I copied the code in there... so now I have it in and it works, but once you get the results it ruins the page layout... is it a Z-Index issue now?

 

Once formatting is screwed you know that it is a CSS issue.  if you want to post that, I can have a look.

Link to comment
Share on other sites

Ok, I do not have my CSS on a separate sheet, its all in the head section.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;

-->
; 	background-color: #efe9e3;
.table-data {
}
.PHP-area {
z-index: 56000;
}
</style>
<script src="950/SpryMenuBar.js" type="text/javascript"></script>
<link href="950/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="950/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />





</style>


<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
padding-left: 15px;
padding-right: 15px;
}
.style5 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
-->
</style>
</head>

<body>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="950/950-hdr-nodrop.png" width="950" height="89" alt="header" /></td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1021" height="25" bgcolor="A91E01"><ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a href="http://www.schylling.com" title="Schylling Toys" target="_top">Home</a>          </li>
      <li><a href="http://www.schylling.com/mm5/merchant.mvc?" title="Catalog" target="_top">Catalog</a></li>
      <li><a class="MenuBarItemSubmenu" href="#">Customer Service</a>
          <ul>
                <li><a href="http://www.schylling.com/om.html" title="Our Mission" target="_top">Our Mission</a>                </li>
            <li><a href="http://www.schylling.com/pp.html" title="Privacy Policy" target="_top">Privacy Policy</a></li>
            <li><a href="http://www.schylling.com/safety.html" title="Safety Information" target="_top">Safety Information</a> </li>
            <li><a href="http://www.schylling.com/directions.html" title="Directions" target="_top">Toy & Game Directions</a></li>
          </ul>
      </li>
      <li><a href="http://www.shopatron.com/home/index/329.0" title="Store" target="_top">Shop Online</a></li>
      <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=SRCH&Store_Code=SD" title="Search" target="_top">Search Our Site</a></li>
    </ul>
    </td>
  </tr>
</table>
<table width="950" height="490" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="47" bgcolor="efe9e3"><div align="center"><img src="950/top-block2.png" width="161" height="47" /></div>
    <td width="775" rowspan="2" valign="top" bgcolor="#FFFFFF"><p class="style1"><img src="direct-assets/Sl-tag.jpg" alt="" width="745" height="59" /> </p>
      <p class="style1"><span class="style5"><strong>Please use the form below to locate a retailer near you.</strong></span></p>
      <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="371" valign="top" class="PHP-area"><?php		 	
if(!isset($_POST['submit'])){
?> 	
            <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
  <p>Search by Zip:</font></b>	    
	<input type="text" name="zipCode" size="20">
(example: 01922) </p>	    
        <p>Search by State:     </b></font> 		
    <input type="text" name="state" size="20">		
    (example: NY for New York) </font></b></span>		
    <input type="submit" name="submit" value="Go">
  </p>
</form>  		

	<?php 			
		} else {			// Page two, search and display 	
$connect = mysql_connect("localhost", "XXXX", "XXXX");  	
$db = mysql_select_db("XXXX", $connect);  	
$sql = "SELECT * FROM STOREDATA WHERE State = '".$_POST['state']."' OR ZIP_Code = '".$_POST['zipCode']."'";  			

$result = mysql_query($sql);  	
$rows = mysql_num_rows($result);  	
if($rows > 0) {  		  
	echo "<p><center></p>				
			<table border=\"1\">  				
			<th align=\"center\newstyle\">Name</th> 				
			<th align=\"center\">City</th> 				
			<th align=\"center\">State</th> 				
			<th align=\"center\">Sales Phone</th>"; 		
	while($row=mysql_fetch_array($result)) {  			
		   echo "<tr><center>					
					<td align=\"center\" class=\"newstyle\">".$row['Name']."</td>					
					<td align=\"center\" class=\"newstyle\">".$row['City']."</td>					
					<td align=\"center\" class=\"newstyle\">".$row['State']."</td>					
					<td align=\"center\" class=\"newstyle\">".$row['Sales_Phone']."</td>				  
				</tr>";  
			}  	
}
  	else {  		
	echo "No results found";  	
}  	mysql_close($connect); ;			
			}		
		?></td>
        </tr>
      </table>
      <p class="style1"> </p>
      <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          
        </tr>
      </table>
      <p class="style1"> </p>
      <p class="style1"> </p>
    <p class="style1"> </p></td>
  </tr>
  <tr>
    <td width="175" height="443" valign="top" class="">

    <ul id="MenuBar2" class="MenuBarVertical">
      <li><a class="MenuBarItemSubmenu" href="#">Schylling Originals</a>
          <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=SO-ABC" target="_top">ABC Collection </a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=SO-PP">Peter Pirate </a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=SO-SM">Sock Monkey </a></li>
          </ul>
      </li>
      <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=AF">Action Figures </a></li>
  <li><a class="MenuBarItemSubmenu" href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=AP">Animals & Plush </a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=AP-PM">Puppets & More </a>          </li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=AP-RD">Rubber Ducks </a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=AP-TT">Thumb Toys </a></li>
      </ul>
  </li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=AC">Arts & Crafts </a></li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=CB" class="MenuBarItemSubmenu">Character / Brands</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=CB-AB">Angeline ballerina</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=CB-CG">Curious George</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=CB-OL">Olivia</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=CB-TF">Thomas & Friends</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=CB-UD">Uglydoll</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=CB-WO">Wizard of Oz</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=CB-ZZ">Zhu Zhu Pets</a></li>
    </ul>
  </li>
   <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=DA" class="MenuBarItemSubmenu">Dolls & Accessories</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=DA-D">Dolls</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=DA-FL">Flatsy</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=DA-FF">Flower Fairies</a></li>
    </ul>
  </li>
    <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=GAM" class="MenuBarItemSubmenu">Games</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=GAM-CG">Classic Games</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=GAM-WB">Panda's Pick (Bamboo)</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=GAM-WB">Wood</a></li>
    </ul>
  </li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=IP" class="MenuBarItemSubmenu">Infant & Preschool</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=IP-ABC">ABC's Collection</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=IP-AM">Ambi</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=IP-BP">Block & Puzzles</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=IP-EA">Eco Angels</a> </li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=IP-JB">Jack In the Box</a></li>
    </ul>
  </li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=JM" class="MenuBarItemSubmenu">Jokes & Magic</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=JM-FAN">Fantasma Magic</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=JM-JO">Jokes</a></li>
    </ul>
  </li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=JF" class="MenuBarItemSubmenu">Just For Fun</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=JF-NO">Novelty</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=JF-WU">Wind-Ups</a></li>
    </ul>
  </li>
<li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=LAV">Lavalite</a></li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=MM">Money Matters</a></li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=MT">Musical</a></li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=OT" class="MenuBarItemSubmenu">Outdoor Play</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=OT-BS">Beach & Sand</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=OT-GARD">Gardening</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=OT-KF">Kites & Flying toys</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=OT-PT">Play Tents</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=OT-PB">Playground Balls</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=OT-RA">Ride Ons & Accessories</a></li>
    </ul>
  </li>
    <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=RP" class="MenuBarItemSubmenu">Role Play</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=RP-CS">Cook Sets</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=RP-DU">Dress Up</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=RP-JA">Jewelry & Accessories</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=RP-TS">Tea Sets</a></li>
    </ul>
  </li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=SC" class="MenuBarItemSubmenu">Science & Building</a>
      <ul>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=SC-DP">Deskpets</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=SC-ER">Erector</a></li>
        <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=SC-SM">Sea Monkeys</a></li>
    </ul>
  </li>
  <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=TTCS" title="Tin Toys">Tin Toys</a></li>
    <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=VEH" class="MenuBarItemSubmenu">Vehicles</a>
    <ul>
      <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=VEH-DAR">Darda Cars & Tracks</a></li>
      <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=VEH-DC">Die Cast</a></li>
      <li><a href="http://www.schylling.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=SD&Category_Code=VEH-TCS">Tin / Collector Series</a></li>
    </ul>
    </ul>    </td>
  </tr>
</table>

<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="950" height="61"><img src="950/footer-rnd.png" width="950" height="50" /></td>
  </tr>
</table>
<p> </p>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
</html>

Link to comment
Share on other sites

Note that you had a few places where tags where closed but had not been opened

 

eg

 

<p>Search by Zip:</font></b>

 

Also am not sure why you are using a Z-index??  This is usually use when you want one area to appear to be in front of another.

 

Anyway, give this a try.

 

<table width="950" height="490" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="47" bgcolor="efe9e3"><div align="center"><img src="950/top-block2.png" width="161" height="47" /></div>
    <td width="775" rowspan="2" valign="top" bgcolor="#FFFFFF"><p class="style1"><img src="direct-assets/Sl-tag.jpg" alt="" width="745" height="59" /> </p>
      <p class="style1"><span class="style5"><strong>Please use the form below to locate a retailer near you.</strong></span></p>
      <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="371" valign="top" class="PHP-area">
	  
<?php	
  if(!isset($_POST['submit'])){
?> 	

	<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
	<label for="zip">Search by Zip:</label><div><input type="text" name="zipCode" size="20" class="input-box" /> <b>(example: 01922)</b></div>
	<br/>
	<label for="state">Search by State:</label><div><input type="text" name="state" size="20" class="input-box" /> <b>(example: NY for New York)</b></div><br/>
	<input type="submit" name="submit" value="Go">
   
</form>  		
</td></tr></table>

 

 

 

Have a look at this page as well for some guidelines http://css-tricks.com/label-placement-on-forms/

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.