最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Adding php to form action breaks code

programmeradmin2浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question

I have a form that is a button to link to a product but for some reason when I add php to the form action it's breaking the block of code. I'm not sure what I am missing. It's a very simple block and I've checked and double checked everything above it and it's all working perfectly until I get to this piece.

Here is the block that is breaking

<form action="<?php echo get_permalink( get_option( 'pctg_wc_meal_choice_page') ); ?>" method="post">
        <input type="hidden" name="meal_plan" value="<?php echo $product->id; ?>" />
        <button type="submit" id="btn_load" class="btn btn-secondary" data-loaing-text="Loading...">Get Started</button>
      </form>

Right it's not recognizing that I've closed the " so the rest of the block of code doesn't work.

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question

I have a form that is a button to link to a product but for some reason when I add php to the form action it's breaking the block of code. I'm not sure what I am missing. It's a very simple block and I've checked and double checked everything above it and it's all working perfectly until I get to this piece.

Here is the block that is breaking

<form action="<?php echo get_permalink( get_option( 'pctg_wc_meal_choice_page') ); ?>" method="post">
        <input type="hidden" name="meal_plan" value="<?php echo $product->id; ?>" />
        <button type="submit" id="btn_load" class="btn btn-secondary" data-loaing-text="Loading...">Get Started</button>
      </form>

Right it's not recognizing that I've closed the " so the rest of the block of code doesn't work.

Share Improve this question asked Jun 5, 2019 at 14:46 kemmiegkemmieg 313 bronze badges 1
  • Breaking how? What does the generated HTML look like on the page? – Rup Commented Jun 5, 2019 at 14:51
Add a comment  | 

1 Answer 1

Reset to default 1

Disregard the entire question. I've found my answer. I was missing a closing tag on the wrapping div. Go figure.

发布评论

评论列表(0)

  1. 暂无评论