找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

destoon增加多选功能

[复制链接]
发表于 2021-8-23 10:02:20 | 显示全部楼层 |阅读模式
1.发表页面

  1. <p><tr></p><p><td class="tl"></td></p><p><td></p><p><table width="510" height="90" border="0" cellpadding="0" cellspacing="0"bgcolor="#FFFAF3" ></p><p><td style="width:50px; word-break:break-all;  "></p><p>{loop $EDUCATIONTIME $k $v}</p><p><input type="checkbox" name="post[educationtime][]" id="educationtime_{$k}" value="{$k}"<?php echo strpos(','.$educationtime.',', ','.$k.',') !== false ? ' checked' : '';?>/></p><p><label for="educationtime_{$k}"> {$v}</label> </p><p>{/loop}</p><p></td></p><p> </table></p><p></td></p><p></tr></p>
复制代码
2.module/模块/模块.calss.php
大约54行
$post['educationtime'] = implode(',', $post['educationtime']);        //新增多选入库3.module/模块/模块.inc.php
$educationtimes = explode(',',$educationtime);//增加读出

4.数据库增加相应字段【可以keyword】类型




您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|知识在线

GMT+8, 2026-11-2 20:18 , Processed in 0.151082 second(s), 21 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表