I am trying to get a variable from a form on my page 1 into a query I have made on page 2 so that when the query works it will use the variable entered on page 1
Page 1 Form
<form method="post" action="testformQ.php">
<input type="text" name="testform">
<input type="submit">enter
Page 2 Query
'$software = mysql_query("SELECT software.SoftwareID, rooms.RoomID
FROM softwareroom
INNER JOIN software
ON software.SoftwareID=softwareroom.SoftwareID
INNER JOIN rooms ON rooms.RoomID=softwareroom.RoomID
WHERE rooms.RoomNum=$_GET[testform]"); (the where clause is where i want the variable)
while($rec = mysql_fetch_array($software))
{
echo $rec['SoftwareID'] . " " . $rec['RoomID'];
}'
So where the GET testform is within the query is where I want the form variable to go. Any help would be appreciated thanks