Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In a mess with Post 1

Status
Not open for further replies.

Domino2

Technical User
Jun 8, 2008
475
GB
I am trying to forward a username and password to another PHP form for verification. However I cannot seem to get the posted value on my verification page. I think its because of a screwed up initial page, where I have no idea whats going on. Part of the code was pasted from another application and the $nt is involved. Don't know if its needed. I also played around with the Submit name which was [B1] since removed. Can anyone please help me get on dry land again. Thanks. Below are parts of page in order they appear.

<form action="LGCheck.php" target="contents" method="post">


<?php
// Make a MySQL Connection
mysql_connect("localhost", "", "") or die(mysql_error());
mysql_select_db("Project") or die(mysql_error());

// Get all the data from the "TBLEMPLOYEES" table

$result = mysql_query("SELECT * FROM tblemployees")
or die(mysql_error());

echo '<select name="splodge" size="19" style="width:150px;">';

while($nt=mysql_fetch_array($result)) {

echo '<option value="'.$nt[strEmpName].'">' .$nt['strEmpName'].'</option>';

}
echo '</select>'; // closing list

?>


<form>
<p><input type="submit" ></p>
</form>

 
You cannot have submit button in a separate (or apparently nested) form. Submit button submits all the information inside the form element it is in. Since your submit button seems to be a in form of it's own, it is submitting nothing. Make sure that submit button is inside the same form you are opening above the php script.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top