<?php
if(isset($_POST['lottery']) && isset($_POST['min']) && isset($_POST['max'])) {
$min = $_POST['min'];
$max = $_POST['max'];
$output = rand($min, $max);
}
else {
$output = '0000';
}
?>
<form method="post" action="/">
<h2>شماره برنده قرعه کشی: <?php echo $output;?></h2>
<p><label for="min">از عدد </label><input type="number" name="min" id="min" value="<?php if(isset($_POST['min'])) echo $_POST['min']; else echo 1;?>" min="0"></p>
<p><label for="max">تا عدد </label><input type="number" na