That's where I'm stymied. This code links to a url. if I switch to line B it attempts to link to email. I'm also trying to alternate line colors.
Select email/forum to visit
<?php
$con=mysqli_connect("localhost","root","cookie","homedb");
/* check connection */
if(mysqli_errno($con))
{ echo "Can't Connect to mySQL:".mysqli_connect_error(); }
else
/* This creates the drop down box */
echo "";
echo ''.'--- Select account ---'.'';
$query = mysqli_query($con,"SELECT target FROM emailtbl");
$query_display = mysqli_query($con,"SELECT * FROM emailtbl");
while($row=mysqli_fetch_array($query))
{
echo "".$row['target']
.'';}
echo '';
?>
<!DOCTYPE>test menu display
<?php
$con=mysqli_connect("localhost","root","cookie","homedb");
if(mysqli_errno($con))
{echo "Can't Connect to mySQL:".mysqli_connect_error();}
if(isset($_POST['target']))
{
$name = $_POST['target']; $count="";
$fetch="SELECT target, username, password, purpose, emailused, lastused,
visitcount, saved FROM emailtbl WHERE target = '".$name."'";
$result = mysqli_query($con,$fetch);
if(!$result)
{ echo "Error:".(mysqli_error($con)); }
/* display the table */
echo '
'. 'online menu'. ' |
'.'
'.'target'.' | '.'username'.' | '.'password'.' | '.'purpose'.' | '.'emailused'.' | '.'lastused'.' | '.'visitcount'.' | '.'saved'.' | |
|