PHP如何post查询结果

问题遇到的现象和发生背景

PHP+MYSQL


```php
$id =$row['id'];

###### 问题相关代码,请勿粘贴截图 
<form action="mark.php" method="post">    
mark: <input type="text" name="mark" />
<input type="submit" />
</form>

###### 运行结果及报错内容 
如何在 POST给mark.php的时候带上$id,并且使mark.php的$sql成立
###### 我的解答思路和尝试过的方法 

###### 我想要达到的结果

mark
...
$sql="INSERT INTO $db_username (mark) VALUES ('$_POST[mark]')  where id= '$_POST[id]'";
...
('$_POST[mark]') where id= '$_POST[id]'";
echo "'$_POST[id]'";
echo "'$_POST[mark]'";


```

<?php
header("Content-type: text/html; charset=utf-8"); //解决中文乱码
/**
     * 模拟post进行url请求
     * @param string $url
     * @param array $post_data
     */
    function request_post($url = '', $post_data = array()) {
        if (empty($url) || empty($post_data)) {
            return false;
        }
       

        $postUrl = $url;
        $curlPost = $post_data;
        $ch = curl_init();//初始化curl
        curl_setopt($ch, CURLOPT_URL,$postUrl);//抓取指定网页
        curl_setopt($ch, CURLOPT_HEADER, 0);//设置header
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
        curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
        curl_setopt($ch, CURLOPT_ENCODING, "");//解压
        //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept-Encoding: gzip, deflate,flate'));
        curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书下同
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //不验证证书下同
        $data = curl_exec($ch);//运行curl
        curl_close($ch);
         //$res=json_decode($data,true);
        return $data;
    }
    
    
    function testAction(){
        $url = 'https://am.22.cn/ajax/taoym/default.ashx?t=0.5844175927806412';
        $post_data['atype']       = '4';
        $post_data['keyword']      = 'haha';
        //$post_data = array();
        $res = request_post($url, $post_data);       
       echo $res;
    }
testAction();

?>