I have a script of 128 barcode, and it is using random number to generate a barcode, how can I make this by using textbox instead of rand in php?
This my code
<!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>