All the code below is intended to and does create a dropdown which selects a record(url)
and submit produces and does not display a table row with a link to the record.
"select & submit" goes back to "select & submit". I've been working on this along time.
anyone work with mysqli?
-----------------------------------------------------------------
Code:
<!DOCTYPE><html><head>
<title>lookup menu</title>
</head>
<body><center><b>
<form name="form" method="post" action="">
<?php
// error_reporting(0);
error_reporting(E_ALL ^ E_NOTICE);
include 'homedb-connect.php';
//This creates the drop down box
echo "<select name= 'target'>";
echo '<option value="">'.'--- Select account ---'.'</option>';
= mysqli_query(,"SELECT target FROM lookuptbl");
= mysqli_query(,"SELECT * FROM lookuptbl");
while(=mysqli_fetch_array())
{echo "<option value='". ['target']."'>".['target']
.'</option>';}
echo '</select>';
?>
<input type="submit" name="submit" value="Submit"/>
</form><center>
<?php
// error_reporting(0);
error_reporting(E_ALL ^ E_NOTICE);
include 'homedb-connect.php';
// ==============================================
if(isset(Array['target']))
{
= Array['target'];
// ===============================================
="SELECT target, purpose, user, password, email, visits, date, saved
FROM lookuptbl WHERE target = '". mysqli_real_escape_string ( , ) . "'";
// ===============================================================================
= mysqli_query(,);
if(!)
{echo "Error:".(mysqli_error());}
//display the table
echo '<table border="1"><tr><td bgcolor="#ccffff" align="center">lookup menu</td></tr>
<tr><td>
<table border="1">
<tr bgcolor="#ccffff">
<td> Target </td>
<td> Purpose </td>
<td> User </td>
<td> Password </td>
<td> Email </td>
<td> Visits </td>
<td> Date </td>
<td> Saved </td>
</tr>';
while(=mysqli_fetch_row())
{
// ==========================================================
= "http://localhost/home/crud-link.php?target=". [0];
= '<a href="'..'">'. [0]. '</a>';
// ===========================================================
echo ("<tr><td> </td><td>[1]</td><td>[2]</td><td>[3]</td>
<td>[4]</td><td>[5]</td><td>[6]</td><td>[7]</td></tr>");
}
echo '</table>
</td></tr></table>';
}
?>
</body></html>