Jump to content

[SOLVED] Not submitting to second PHP page


Cboyd13

Recommended Posts

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)
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.