如何从 php 中的文本框生成 128 条码?

How can I generate 128 bar code from a text box in php?

我有一个 128 条码的脚本,它使用随机数生成条码,我如何通过在 php 中使用文本框而不是随机数来制作它?

这是我的代码

<!DOCTYPE html>
<html>
<head>
    <title>asd</title>
</head>
<body>
<?php
if (isset($_POST['submit'])) {
    $bcode = $_GET['id'];
    ini_set('display_errors',1);
    error_reporting(E_ALL|E_STRICT);
    include 'Code128.php';
    $code = isset($_GET['code']) ? $_GET['code'] :$bcode; 
    header("Content-type: image/svg+xml");
    echo draw($code);
}
?>

<form method="POST">
    <input type="text" name="id">
    <input type="submit" name="submit">
</form>
</body>
</html>

文本框无法随机生成数字...

我已经解决了问题,

<form method="Get" action="barcode.php">
<input type="text" name="barcode">
<input type="submit"> 

</form>

barcode.php