Where is the error in php code?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
9 views
Help , vidaet error:
Notice: Undefined index: submit in ..\\Playground\\

PHP Notice: Undefined index: submit in ..\\Playground\\
-----------------------------------------------------
Code:

<?phpif($_POST["submit"]){$min = $_POST["min"];$max = $_POST["min"];$n = rand ($min , $max);echo $n;}?>

Did everything like in the video https://www.youtube.com/watch?v=FCHxBdE0Sqk&t=196s
by | 9 views

3 Answers

0 like 0 dislike
$min = $_POST["min"];
$max = $_POST["min"];
by
0 like 0 dislike
It should be so.
<?php\rif($_POST["submit"])\r{\r$min = $_POST["min"];\r$max = $_POST["max"];\r$n = rand ($min , $max);\recho $n;\r}\r?>
by
0 like 0 dislike
\r\r\r\r\r\r<?php\rif (isset($_POST['submit'])) {\r$min = intval($_POST['min']);\r$max = intval($_POST['max']);\r$n = rand($min , $max);\recho $n;\r}\r?>\r
by

Related questions

0 like 0 dislike
4 answers
asked Apr 22, 2019 by 0ldn0mad
0 like 0 dislike
1 answer
asked May 21, 2019 by andrei2018
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Apr 4, 2019 by redd_i
0 like 0 dislike
1 answer
asked Jun 9, 2019 by duha96
110,608 questions
257,186 answers
0 comments
35,390 users