按下按钮时更改表格的单元格

时间:2016-12-15 13:35:01

标签: php sql html5

我正在寻找帮助改变表格中单元格的颜色。如果我删除import os import zipfile import shutil def zip(src, dst): zf = zipfile.ZipFile("%s.zip" % (dst), "w", zipfile.ZIP_DEFLATED) abs_src = os.path.abspath(src) for dirname, subdirs, files in os.walk(src): for filename in files: absname = os.path.abspath(os.path.join(dirname, filename)) arcname = absname[len(abs_src) + 1:] print('zipping %s as %s' % (os.path.join(dirname, filename), arcname)) zf.write(absname, arcname) zf.close() source=r"C:\Users\severna\Desktop\Non_Test_Python_Files\dist" destination=r"C:\Users\severna\Desktop\Non_Test_Python_Files\app4export" shutil.rmtree(str(destination)) try: zip(str(source), str(destination)) shutil.rmtree(str(source)) except FileNotFoundError: print("Source cannot be zipped as it does not exist!") ,它会起作用,但我只希望在单击按钮时发生这种情况。非常感谢帮助。

if(isset($_POST['showapp'])){

1 个答案:

答案 0 :(得分:0)

您需要将输入放在<form></form>标记中。 没有它,它就不会工作。

<form method="post"> <input name="showapp" type="submit" value="Show Appointments"> </form>