我有一个简单的PHP脚本,它从文本文件中读取特定的短语,并在网页上随机显示一个。为了显示另一个随机短语,目前必须刷新整个页面。目前,下面的PHP包含在一个h1标签中,该标签已经使用CSS设置了样式。然后,我在它下面添加了一个注释,告诉用户刷新页面以显示另一个随机短语。以下是用于显示随机短语的简单PHP:
$str = file_get_contents('words.txt'); //Take the contents from the file to the variable
嘿,由于下面的代码,我的页面上有一个表:
$result = mysql_query("Select * from porders, porders_detail, parts where porders.order_no= porders_detail.order_no and porders_detail.om_part_no = parts.om_part_no") or die(mysql_error());但是我想要显示一个下拉列表,并使用jQuery将下拉列表的值包含到上面的mysq