Php 尝试将两个用户输入相乘
我正在尝试制作一个电影院网页。非常nooby,几乎没有PHP和HTML经验。我们在学校学习,我们只是使用AdobeDreamweaver来插入诸如记录集、绑定、表格等内容 现在我想创建一个页面,用户可以在其中订购一张票,我已经创建了一个表单,但是它只插入一张票(obv)的值。我想让价格显示为1张票,但在MySQL数据库中存储为价格*票数。如果有人能在这里帮助我,我将非常高兴:Php 尝试将两个用户输入相乘,php,mysql,Php,Mysql,我正在尝试制作一个电影院网页。非常nooby,几乎没有PHP和HTML经验。我们在学校学习,我们只是使用AdobeDreamweaver来插入诸如记录集、绑定、表格等内容 现在我想创建一个页面,用户可以在其中订购一张票,我已经创建了一个表单,但是它只插入一张票(obv)的值。我想让价格显示为1张票,但在MySQL数据库中存储为价格*票数。如果有人能在这里帮助我,我将非常高兴: <form action="<?php echo $editFormAction; ?>" metho
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">Pris_kr:</td>
<td><?php echo $row_Recordset1['pris_kr']; ?> pr billett<input type="hidden" value="<?php $row_Recordset1['pris_kr']*$row_antall_billetter;?>"/></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Personid:</td>
<td><select name="personid">
<?php
do {
?>
<option value="<?php echo $row_Recordset1['personid']?>" ><?php echo $row_Recordset1['epost']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
?>
</select></td>
</tr>
<tr> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Antall_billetter:</td>
<td><input type="text" name="antall_billetter" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Rad:</td>
<td><input type="text" name="rad" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Sete:</td>
<td><input type="text" name="sete" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" value="Insert record" /></td>
</tr>
</table>
<input type="hidden" name="bestillingsid" value="" />
<input type="hidden" name="visningsid" value="<?php echo $_GET['visningsid']; ?>" />
<input type="hidden" name="MM_insert" value="form1" />
</form>
pr比莱特
安塔勒·比勒特:
拉德:
Sete:
pr billettCool,从未见过有人在问题中做过瑞典语-英语翻译:DCool真的。但我仍然不确定实际的问题是什么。$row\u antall\u biletter
是在哪里定义的,这些值是实数还是字符串?当用户输入值时,$row\u antall\u biletter就被定义了。这是一个表单,其中显示“Price pr ticket=100”,然后用户输入例如3张票。当按下submit时,我希望“price pr ticket”乘以3,然后存储在我的数据库中。我从来没有见过有人在问题中做过瑞典语-英语翻译:DCool确实如此。但我仍然不确定实际的问题是什么。$row\u antall\u biletter
是在哪里定义的,这些值是实数还是字符串?当用户输入值时,$row\u antall\u biletter就被定义了。这是一个表单,其中显示“Price pr ticket=100”,然后用户输入例如3张票。当按下submit时,我希望“price pr ticket”乘以3,然后存储在我的数据库中
<td nowrap="nowrap" align="right">Pris_kr:</td>
<td><?php echo $row_Recordset1['pris_kr']; ?> pr billett<input type="hidden" value="<?php $row_Recordset1['pris_kr']*$row_antall_billetter;?>"/></td>