Php从用户获取号码 [英] Php getting number from user

查看:46
本文介绍了Php从用户获取号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个php程序,提示用户输入他/她希望的数字。号码输入的终止应该用字母N或n来完成。一旦数字输入完成,程序预计将打印数字的最大值,最小值,平均值,模式和中位数以及直方图。



我只是想要学习如何从用户那里获取他/她希望的号码和终止号码。



我尝试了什么: < br $> b $ b

I want to write a php program that prompts user to enter as many numbers as he/she wishes. The termination of number entry should be done by the letter N or n. Once the number entry is completed the program is expected to print the max, min, average, mode and median of the numbers alongside with a histogram.

I just want to learn how to take number from a user as many number as he/she wishes and make the termination.

What I have tried:

<html>
<body>
<form action="example.php" method="post>
Enter a number:
<input type="number_format" name="number"> <br> <br>
<input type="submit" value="submit">
</form>
</body>
</html>

< br $>


------





------

<?php

$num = $_POST=['number'];



?>

推荐答案

num =
num =


_POST = [' ];



?>
_POST=['number']; ?>



这篇关于Php从用户获取号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆