Cboyd13 Posted November 16, 2009 Share Posted November 16, 2009 I have set up 2 php pages. The first page submits to the second page and grabs info from it to run an SQL statement. The thing is when i hit the submit button, it just loads and doesnt do anything. <?php echo "<form>"; echo "<table>"; echo "<tr>"; echo "<td>"; echo "<form name='Query' action='http://localhost/project5b.php' method='post'>"; echo "Select Database Name"; echo "</td>"; echo "<td>"; echo "<select name='selectedDB'>"; $conn=mysqli_connect("localhost","root",""); $sql="show databases"; $recordset=mysqli_query($conn,$sql); while($record=mysqli_fetch_array($recordset,MYSQLI_ASSOC)){ if ($record['Database']!='information_schema' and $record['Database']!='mysql'){ echo "<option value=".$record['Database'].">".$record['Database']."</option>"; }; }; echo "</select>"; echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; echo "Type SQL"; echo "</td>"; echo "<td>"; echo "<input name='entry' size='50'>"; echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>"; echo "<input type='Submit' value='Submit'>"; echo "</td>"; echo "</tr>"; echo "</table>"; echo "</form>"; mysqli_free_result($recordset); mysqli_close($conn) ?> Link to comment https://forums.phpfreaks.com/topic/181795-solved-not-submitting-to-second-php-page/ Share on other sites More sharing options...
mrMarcus Posted November 16, 2009 Share Posted November 16, 2009 in your first chunk of code, you have two opening <form> tags. can't nest form's. Link to comment https://forums.phpfreaks.com/topic/181795-solved-not-submitting-to-second-php-page/#findComment-958770 Share on other sites More sharing options...
Cboyd13 Posted November 16, 2009 Author Share Posted November 16, 2009 Im an idiot, thanks Link to comment https://forums.phpfreaks.com/topic/181795-solved-not-submitting-to-second-php-page/#findComment-958784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.