如何制作带有表格数据的trello卡?

I have been working on a way of making a trello card through my website but with all the fields filled out, it will only make the card and nothing else. The card appears in the correct list, just with no description or title on it.

<!DOCTYPE html>
<html lang="en">

<?php
   ob_start();
   session_start();
?>

<?
   // error_reporting(E_ALL);
   // ini_set("display_errors", 1);
?>

    <head>
        <title>Some Major Oofery About</title>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <!-- import the webpage's stylesheet -->
        <link rel="stylesheet" href="/ohr.css">

        <!-- import the webpage's javascript file -->
        <script src="/script.js" defer></script>
      </head>

      <div class="form-createcard">
<?php
if ($_POST) {
  $card_name = htmlspecialchars($_POST['cardname']);
  $card_content = htmlspecialchars($_POST['carddesc']) . "
";
  $card_content .= htmlspecialchars($_POST['authorname']) . "
";
  $card_content .= htmlspecialchars($_POST['duedate']);

  $trello_key          = '---';
  $trello_api_endpoint = 'https://api.trello.com/1';
  $trello_list_id      = '---';
  $trello_member_token = '---'; // Guard this well

  $url = 'https://api.trello.com/1/cards';
  $fields='token='.$trello_member_token;
  $fields.='&key='.$trello_key;
  $fields.='&idList='.$trello_list_id;
  $fields.='&name='.$card_name;
  $fields.='&desc='.$card_content;

  $result = trello_post($url, $fields);
}

function trello_post($url, $fields){
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
  curl_setopt($ch, CURLOPT_HEADER, 0);    curl_setopt($ch, CURLINFO_HEADER_OUT, true);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_TIMEOUT, 0);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  $output = curl_exec($ch);
  curl_close($ch);
  return json_decode($output);
}
?>
</div>

    <body>
        <header class="header">

    <div class="centered">
            <h1>Create Trello Card to <a href="---">Suspensions/Some Major Oofery Board</a></h1>
            <form class = "form-createcard" role = "form" 
            action = "<?php echo htmlspecialchars($_SERVER['PHP_SELF']); 
            ?>" method = "post">
            <input id="cardname" type="text" placeholder="Card Name">
            <input id="duedate" type="date" placeholder="Due Date">
            <input id="carddesc" type="text" placeholder="Card Description">
            <input id="authorname" type="text" placeholder="Your Name">
            <button name="submit" type="submit" id="trellosubmit">Submit Entry</button>
            </form>
        <hr>
    </div>

I know the key/token are not there, I blocked them out. The card sends, makes the card, but the title and description are empty values. Yes, this is a php file so dont ask.