php输出到新的php页面

I'm trying to make a update news script in which a selection can be made of a database entry and revert this selection to a new php page called updatenews.php which needs to be showing a textarea with the message and a textarea with the date. after pressing Update this entry should be updated into the database.

I did get managed to make my script upload news messages in a way it loads a new page which shows the upload and then reloads to the previous page, and a part to delete messages that are selected from the database. Those work like a sharm

I thought to use the same thing in some way but when the updatenews.php page gets loaded it loads the HTML part, but doesn't show the entries from the selection on the previous page.

How can i fetch the "results" from the selection on the previous page to the new page and make the script remember the id for when the update button is pressed?

This is what i have for the page that shows the database entries where delete or update is selected:

<?php error_reporting(E_ALL); ini_set('display_errors', 1);
// Get our database connector
require("includes/conn.php");
?>
<?php
if(isset($_POST['update'])){ // Check update button is clicked
  foreach($_POST['checkbox'] as $update_id){ // loop only checked items and load update page
  $sql = "SELECT FROM news WHERE id='$update_id'"; 
$result = mysqli_query($conn, $sql);
echo "De update pagina wordt in 5 seconden geladen.";
header('Refresh: 5; url=updatenews.php');
  }
}

?>

<?php
if(isset($_POST['delete'])){ // Check delete button is clicked
  foreach($_POST['checkbox'] as $del_id){ // loop only checked items and delete
   $sql = "DELETE FROM news WHERE id='$del_id'"; 
$result = mysqli_query($conn, $sql);
  }
}

?>
<?php
$result=mysqli_query($conn, "SELECT * FROM news ORDER BY ID");

$count=mysqli_num_rows($result);
?>
<!DOCTYPE html>
<html>
<head>
<title>Upload Multiple Images Using jquery and PHP</title>
<!------- Including CSS File ------>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div align="center">
<table background="transparent" width="400" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><form name="form1" method="post" action="">
<table width="400" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF">&nbsp;</td>
<td colspan="4" bgcolor="#FFFFFF"><strong>Selecteer welke berichten verwijderd moeten worden.</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFFFF">#</td>
<td align="center" bgcolor="#FFFFFF"><strong>Datum</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>news post</strong></td>
</tr>
<?php
while($rows=mysqli_fetch_array($result)){

echo "<div class=\"picture\">";
                    echo "<p>";
?>

<tr>
<td align="center" bgcolor="#FFFFFF"><input name="checkbox[]" type="checkbox" id="checkbox[]" value="<?php echo $rows['id']; ?>"></td>
<td bgcolor="#FFFFFF"><?php echo $rows['date']; ?></td>
<td bgcolor="#FFFFFF"><?php echo $rows['news']; ?></td>
</tr>

<?php 
                    echo "</p>";
                    echo "</div>";
}
?>

<tr>
<td colspan="5" align="center" bgcolor="#FFFFFF"><input name="delete" type="submit" id="delete" value="Delete"><input name="update" type="submit" id="update" value="Update"></td>
</tr>

<?php

// Check if delete button active, start this 



mysqli_close($conn);
?>

</table>
</form>
</td>
</tr>
</table>

<a href="newsupload.php" title="Back">Back</a>
</div>
</body>
</html>

And this is the updatenews.php page that gets loaded:

<?php

session_start(); /// initialize session 
include("important/passwords.php"); 
check_logged(); /// function checks if visitor is logged. If user is not logged the user is redirected to login.php page  

// Start a session for displaying any form errors

session_start();
?>
<?php error_reporting(E_ALL); ini_set('display_errors', 1);
// Get our database connector
require("includes/conn.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>Upload Multiple Images Using jquery and PHP</title>
<!------- Including CSS File ------>
<link rel="stylesheet" type="text/css" href="style.css">

        <style type="text/css">
            label
            {
                float: left;
                text-align: right;
                margin-right: 10px;
                width: 100px;
                color: black;
            }

            #submit
            {
    float: left;
    margin-top: 5px;
    position: relative;
    left: 43%;
            }
            #error
            {
                color: red;
                font-weight: bold;
                font-size: 16pt;
            }

        </style>
    </head>

    <body>
<div id="maindiv">
<div id="formdiv">
<h2 align="center">Update nieuws</h2>


                <?php 
                if (isset($_SESSION['error']))
                {
                    echo "<span id=\"error\"><p>" . $_SESSION['error'] . "</p></span>";
                    unset($_SESSION['error']);
                    }

$query="UPDATE into news (date, news) values ('$date', '$news')"; 
 ?>   

                <form action="upload.php" method="post" enctype="multipart/form-data">
               
                    <label>Datum:</label>
                    <input type="text" name="date" style="width:250px;" value="<?php echo 'date'; ?>"/><br />

                    <label>Nieuws:</label>
                    <textarea name="news" style="width:250px;height:150px;" value="<?php echo 'news'; ?>" ></textarea><br /><br />
                 
                    <input type="submit" value="Update" name="submit" id="submit" class="upload" />
               </p>
                </form>
                 <form action="logout.php" method="post" class="textdelete">
                 <input type="submit" name="formSubmit" value="Logout" />
                 </form>
                 </p>
         </div>
         </div>
    </body>
</html>

I think the problem is with the way i fetch the results and try to get them to the updatenews.php page, but i can't seem to figure out how or where i'm going wrong as I am pretty noob to php coding...

</div>

To get your results passed on to the "updatenews.php" page, you need to pass the "$update_id" variable in your URL like this: "updatenews.php?id=$update_id"

And then in your "updatenews.php", you retrieve the "$update_id" value like this: "$retrieve_id = $_GET['id'];"

Hope this helps you out !