dongtan5555 2016-10-15 17:23
浏览 38

HTML元素的PHP变量? (不输入)

I'm designing a website for a restaurant. You can make a reservation for how many people and at what time. For the people one, there's a <span> class that will have a number from 1 to 20 that the user can adjust.

I already know about the $_POST method for input fields and those are working just fine. However, I'm not a back-end developer my nature and thus don't know a whole lot about PHP. I can't seem to find a way to make a variable from the element with PHP.

With JavaScript it'd be as simple as $var = $("span"); or what have you. I'm not exactly sure how to do this with PHP.

To be clear, I want to make the contents of this span element into a variable for PHP. The $_POST method doesn't appear to work for non-input fields.

If anyone can help me out with this, that'd be great.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表
    • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
    • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题