Parse error: syntax error, unexpected '?'
I have code that is supposed to select all of the rows of data from a database, and echo them all into a checkbox for for deletion. But for some reason it won't work. I keep getting the error: Parse error: syntax error, unexpected '?' in \delete.php on line 13

My code is:


    <form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">

    <?php

    $connect= mysqli_connect("localhost", "root", "", "friends_list");

    $query= "SELECT * FROM people";

    $result= mysqli_query($connect, $query);

    while ($row= mysqli_fetch_array($result)) 
    {
	echo '<input type="checkbox" value=" '<?php echo $row['id']; ?>'"        name="todelete[]"/>' . 
	echo $row['first_name'] . ' ' . $row['last_name'] . ' ' . $row['age'] . '<br/>';

    }

    mysqli_close($connect);
 
    ?>

    <input type="submit" value="remove" name="remove"/>

    </form>

What am I doing wrong?
Parse error: syntax error, unexpected '?'
===

I have code that is supposed to select all of the rows of data from a database, and echo them all into a checkbox for for deletion. But for some reason it won't work. I keep getting the error: Parse error: syntax error, unexpected '?' in \delete.php on line 13

My code is:


    <form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">

    <?php

    $connect= mysqli_connect("localhost", "root", "", "friends_list");

    $query= "SELECT * FROM people";

    $result= mysqli_query($connect, $query);

    while ($row= mysqli_fetch_array($result)) 
    {
	echo '<input type="checkbox" value=" '<?php echo $row['id']; ?>'"        name="todelete[]"/>' . 
	echo $row['first_name'] . ' ' . $row['last_name'] . ' ' . $row['age'] . '<br/>';

    }

    mysqli_close($connect);
 
    ?>

    <input type="submit" value="remove" name="remove"/>

    </form>

What am I doing wrong?