Sending an HTML email on a PHP code gives me a Syntax Error

Good morning, I'm having problems when I execute my code, I think I'm having problems with the quotes, etc.

Good morning, I'm having problems when I execute my code, I think I'm having problems with the quotes, etc.

So far this is what I've tried and I'm stil having syntax error with this specific line of codes.

$message .= "if ($row['status']) :
        		$output .= '<td>'.$row["status"].'</td> ';
    			else:
        		$output .= '
                <td>
                    <form method="post" action="update-request-status.php">
                        <input type="hidden" name="reqnumber" value="'.$row['reqnumber'].'" />
                        <button class="button" type="submit" name="completed" value=""><span>New Request!</span></button>
                    </form>
                </td>";

Here's what it looks like right now:

Summary

Error

Pull database info and display to html problem?

I'm trying to display the information from the database to the html page but it is only displaying the message "connected successfully". The name of the database is "admin" and the table within that database is called "users". I have no idea how to get past the message and just display the table I have created.

I'm trying to display the information from the database to the html page but it is only displaying the message "connected successfully". The name of the database is "admin" and the table within that database is called "users". I have no idea how to get past the message and just display the table I have created.

Index page (index.php):

<?php
include_once('connection.php');
$query="select * from users";
$result=mysql_query($query);
?>
<!DOCTYPE html>
<html>
<title>
    <head> Fetch Data Frome Database</head>
</title>
<body>

<table align="center" border="1px" style="width:250px; line-height: 30px;">
<tr>
<th colspan="4"><h2>Account Record</h2></th>
</tr>
<t>
<th>ID</th>
<th>Username</th>
<th>Password</th>
</t>

&lt;?php

while($rows=mysql_fetch_assoc($result))
{
?&gt;

&lt;tr&gt;
    &lt;td&gt;&lt;?php echo $rows['ID'];?&gt;&lt;/td&gt;
    &lt;td&gt;&lt;?php echo $rows['username'];?&gt;&lt;/td&gt;
    &lt;td&gt;&lt;?php echo $rows['password'];?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;?php
}

?&gt;

</table>

</body>
</html>

CONNECTION PAGE (connection.php):

<?php
//Include your own values for username, password and dbase name

$host = "localhost";
$username = "root";
$password = "root";
$dbname = "admin";

// Create connection
$conn = new mysqli($host, $username, $password, $dbname);

// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>


PHP / MySQL - Count how many table in database contain Specific name

I'm building an admin to control an interactive game, and I'm using PHP/MySql to store all the data for all the rounds. Each of the tables that I want to load into the game via PHP are titled "Puzzle*" with the * being an incremental index number. There are a few other tables in my database for global game data and bonus rounds.

I'm building an admin to control an interactive game, and I'm using PHP/MySql to store all the data for all the rounds. Each of the tables that I want to load into the game via PHP are titled "Puzzle*" with the * being an incremental index number. There are a few other tables in my database for global game data and bonus rounds.

What I want to be able to do is count the number of tables in my database that contain the name "Puzzle", and then use that total number as a randomizer to select a puzzle randomly. I plan to have roughly 50 puzzles, so an automated way of selecting a random puzzle, and then if I want to select another puzzle - to remove that previous puzzle from the list so that there is no chance of it being repeated until I start the whole game over again.

MySQL Database

Database Name: puzzleGame
Table 1: puzzle1
Table 2: puzzle2
Table 3: puzzle3
Table 4: puzzle4
Table 5: globals
Table 6: bonus


Inserting session array into mysql database

I am still learning bits of PHP and have been stuck on this issue regarding the POST data from radio buttons within a form being inserted into a mysql database from a session array. Currently, I have 2 questions within my survey and they consist of radio button options for a user to select from. The relevant answers can be selected and they are stored in a session array:

I am still learning bits of PHP and have been stuck on this issue regarding the POST data from radio buttons within a form being inserted into a mysql database from a session array. Currently, I have 2 questions within my survey and they consist of radio button options for a user to select from. The relevant answers can be selected and they are stored in a session array:

array(1) { ["choice"]=> array(2) { [0]=> string(11) "56-65 years" [1]=> string(17) "Prefer not to say" } }

However I was not too sure if the array should be as such. The two answers chosen from the radio options in the above example are "56-65 years" and "Prefer not to say".

Following on from the session array, I am trying to insert each of those answers in to a mysql database. I have a column created to insert each answer (i.e. there are two columns (question 1 and question 2) to store the two answers from the example above).

I am aware that my code is open to SQL injection and plan on fixing that after overcoming the inserting of data.

Question.php

     <form method="POST" action="process.php">
      <ul class="choices">
  &lt;?php while($row = $answers-&gt;fetch_assoc()):?&gt;
    &lt;li&gt;&lt;input type="radio" name="choice" value="&lt;?php echo $row['answerText']; ?&gt;"&gt;

    &lt;?php echo $row['answerText'] ?&gt;&lt;/li&gt;
    &lt;?php endWhile; ?&gt;

  &lt;/ul&gt; 
  &lt;input type="submit" name="submit" value="Next Question"&gt;
  &lt;input type="hidden" name="number" value="&lt;?php echo $number; ?&gt;"&gt;

</form>

Process.php

<?php

    if(isset($_POST['submit'])){

$number = $_POST['number'];
$next = $number+1;

$selected_choice = $_POST['choice'];
$_SESSION['choice'][] = $selected_choice;

foreach ($_SESSION['choice'] as $key) {

$user_responses = $key;

}

$insertdata = "INSERT INTO userAnswersTable('question1', 'question2') VALUES ($_SESSION['choice'])";
$resulting = $mysqli->query($insertdata) or die($mysqli->error.LINE);

}
?>

I would expect each of the user responses to be in an array from which each individual selected choice within the session array can be stored in each corresponding column within the mySql table. Any suggestions would be very helpful.