我是初学者,也是文凭学生...我试图更新我的mysql数据库,但有一些错误...请帮我解决...
这是我的错误:
Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in C:\xampp\htdocs\SLR\Update S110 PC01.php:17 Stack trace: #0 {main} thrown in C:\xampp\htdocs\SLR\Update S110 PC01.php on line 17
这是我的代码:
<html>
<body>
</br>
</br>
<center>
<div align="center">
</br>
</br>
</br>
<?php
include("dbconnect.php");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("s110_pc01", $con);
$sql = "UPDATE SET soft_name='$_POST[soft_name]', installed_date='$_POST[installed_date]', expiry_date='$_POST[expiry_date]', product_key='$_POST[product_key]' WHERE soft_id='$_POST[soft_id]'";
$retval=mysql_query($sql);
if(! $retval )
{
die('Could not Update data: ' . mysql_error());
}
echo "Successfully updated\n";
mysql_close($con);
?>
<input type="button"value="Finish"onclick="window.location.href='managerhome.php'">
</form>
</table>
</div>
</body>
</html>