I am looking to have the fields in a table display to a webpage when a user inputs a name and number corresponding to the vaule in the table. For example if the user enters in Bob for the name and 103 for the number the table that contains his information has his Name in a field and number in a field as well as other information that he wants to see. I want the user to enter in this data to then be directed to a page that displays the entire row or colmun related to him. Is this possible to do. If so where can I get a script or information on how to wirte this. So far this is all I have.

<?php
if(isset($POST['find']) && ($POST['FirstName']) && ($POST['BibNo']))
{
$firstName = $
POST['FirstName'];
$Bib = $_POST['BibNo'];

					}
					else
					echo "Please enter in both First Name and Bib No.";
					?>
						 <table width="130">
							<tr>

								<td><form name="search" id="search" method="post" action="<?php echo($PHP_SELF) ?>"> 									  
									<table width="130" border="0" cellpadding="0" cellspacing="0" class="searchBorder">
									<tr>
										<td class="title">Results look up</td>
									</tr>
								  		<td align="center" valign="top">
									  	<br/>
										<br/>			

											<table border="0" cellpadding="0" cellspacing="0">
											<tr>
												<td align="right">First Name:</td>
												<td align="left"><input size="6" type="text" name="FirstName" id="FirstName"></td>

											</tr>
												<td align="right">Bib No:</td>
												<td align="left"><input size="6" type="text" name="BibNo" id="BibNo"></td>
											</tr>
											</table>

											<table border="0" cellpadding="0" cellspacing="0">
											<tr>
												<td><input name="find" type="submit" id="find" class="button" value="Go"></td>
											</tr>
											</table>										  
											<br/>
											<br/>
											<br/>
										  </td>
									</table>
							  		</form>

    you will need to look up the mysql functions in the manual to understand how to connect to and display info from a db, but your query would be something like.

      $Firstname = $_POST['FirstName'];
      $BibNo = $_POST['Bibno'];
      $query = "SELECT * FROM tbl WHERE FirstName = '$FirstName' AND BibNo = $Bibno";
    
      Write a Reply...