Hello everyone, I have a page named index.php. in this page I have 3 inputs & a table. the purpose is that to send the data from these inputs to both database(mine easyPHP) & the table I've created in this page,as what we have the inbox tables in emails or Gmail(that it can generate the rows of the table with different content as much as is needed). Here I have 2 problems:

1) What I need is to remain the input form after clicking the send button (or submit button),but Here after clicking this it'll be disappear!

2) I have a problem with showing the data I've fetched(for table content) & it errors me in each cell of table that: "Warning: Illegal string offset 'title' in C:\Program Files (x86)\EasyPHP-DevServer-13.1VC11\data\localweb\projects\TeamWork\index.php on line 99"

now here is the code:

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TeamWork task</title>
    <link type="text/css" rel="stylesheet" href="twStyle.css">


//    $email=$_SESSION['email'];
//    $name="SELECT FirstName, LastName From teamwork_members where Email ='$email'";
//    $query=$conn->prepare($name);
//    $query->execute();
//    $result = $query->fetchall();
//    print_r($query->errorInfo());
echo "welcome"." ".$_SESSION['FirstName']." ".$_SESSION['LastName'] ;


if ( empty( $_POST ) ){


        <form method="post">

            <label for="uid">to whom?</label><br/>
            <input type="text" name="uid"><br/>
            <label for="title">title:</label><br/>
            <input type="text" name="title"><br/>
            <label for="content_task">content_task:</label><br/>
            <textarea type="text" name="content_task"></textarea><br/>

            <button type="submit"  value="submit" name="send">send</button>



} else {

    try {

$_POST['send'])) && (!empty($_POST['send'])))
$form $_POST;
$uid $_SESSION['UID'];
$title $form'title' ];
$content_task $form'content_task' ];
$sql "INSERT INTO task (
                          uid, title, content_task )
                        VALUES (
                          :uid, :title, :content_task)"

$query $conn->prepare$sql );
$query->execute( array(':uid'=>$uid':title'=>$title':content_task'=>$content_task) );
// print_r($query->errorInfo());
PDOException $e)


        <table border="1 solid #000000">
                <td>content of task</td>
"SELECT COUNT(`id`) as numbers, id, uid, title, content_task FROM `task`" ;

$query=$conn->prepare ($mytask);
$query->execute( );
$task_panel $query->fetchAll();

$row 0;
$task_panel as $task){
$row +=;
                            <td><?php $row ?></td>
                            <td><?php $task[0]['title']?></td>
                            <td><?php $task[0]['content_task']?></td>

Thanks everyone