脚本宝典收集整理的这篇文章主要介绍了使用php和mysql在iFrame V2中显示特定的URL,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个sql数据库,例如,“用户名,密码,国籍,类”,我想要做的是,一个简单的PHP或SQL查询,它将从数据库检查用户的类字段并在指定的地方显示相应的URL iFrame(例如,类是J1,J2,J3,如果字段已经包含J3,那么在加载时显示相应的URL,没有任何用户输入.(所有都将提前决定)
您可以将其视为学生档案,一旦学生成功登录,查询将读取班级字段,并根据找到的内容,它将返回具有正确链接的可点击URL.
<!-- NOTIFICATIONS STARTS HERE --> <?PHP require_once('connection.PHP'); $id=$_SESSION['SESS_MEMBER_ID']; $result3 = MysqL_query("SELECT * From member where mem_id='$id'"); while($row3 = MysqL_fetch_array($result3)) { $fname=$row3['fname']; $country=$row3['country']; $class=$row3['class']; $headteacher=$row3['headteacher']; $attendance=$row3['attendance']; $homework=$row3['homework']; $messageparents=$row3['messagestudent']; } ?> <table width="468" border="0" align="center" cellpadding="0"> <tr class="FONTS"> <td valign="top"><div align="left" class="FONTS"> <table width="468" border="0" align="center" cellpadding="0"> <tr> <td class="FONTS"><div align="left" class="FONTS"><b>名前:</b></div> <?PHP echo $fname ?></td> </tr> <tr class="FONTS"> <td valign="top"><div align="left" class="FONTS"><b>国:</b></div> <?PHP echo $country ?></td> </tr> <tr class="FONTS"> <td valign="top"><div align="left" class="FONTS"><b>クラス:</b></div> <?PHP echo $class ?></td> </tr> <tr class="FONTS"> <td valign="top"><div align="left" class="FONTS"><b>家庭教師の先生:</b></div> <?PHP echo $headteacher ?></td> </tr> <tr class="FONTS"> <td valign="top"><div align="left" class="FONTS"><b>出席率:</b></div> <?PHP echo $attendance ?></td> </tr> <tr class="FONTS"> <td valign="top"><div align="left" class="FONTS"><b>宿題率:</b></div> <?PHP echo $homework ?></td> </tr> <tr class="FONTS"> <td valign="top"><div align="left" class="FONTS"><b>先生からメッセージ:</b> </div> <?PHP echo $messagestudent ?></td> </tr> </table> </div></td> </tr> </table> <p align="center" class="FONTS"><a href="index.PHP">ログアウト</a></p> <!-- NOTIFICATIONS ENDS HERE -->
它已经按预期工作,所以我不会改变它,除非它是完全必要的,我只需要能够显示该URL链接.
提前致谢!
以上是脚本宝典为你收集整理的使用php和mysql在iFrame V2中显示特定的URL全部内容,希望文章能够帮你解决使用php和mysql在iFrame V2中显示特定的URL所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。