4

I have tried to post the following to Stack Overflow:


I have a very simple HTML form embedded in an email I send to people who have subscribed to my blog so they can confirm their email addresses. The embedded code is:

$_POST['Name_First'],

Thank you for subscribing to my Blog.

Please click to confirm your email address.

Thank you!

P. James Norris
Order Cetacea

where the two PHP variables are supplied by the PHP of my blog page that sends the email.

What appears in the sent email is what I would expect:

P. James,

Thank you for subscribing to my Blog.

Please click here to confirm your email address.

Thank you!

P. James Norris

Order Cetacea

Sent from www.ocetacea.net/pjamesnorris

where the "here" appears as a hyperlink.

When I click on the link (having subscribed myself with one of my email addresses), my blog page loads but does not appear to receive the email address as POST data (or GET data, for that matter)--I echo both but nothing appears on the page.

I built a webpage using exactly the same code as the email, and clicking on "here" on the webpage works as I want the email form to work, i.e., the email address is transmitted to my blog page as POST data.

I've looked at Adding HTML forms to... and Embed HTML form in email and both of these posts are quite old and, I hope, quite out of date.

Could someone please tell me what obvious and stupid mistake I'm making?

Thanks.


And I got the error message:

Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.

And I cannot figure out why.

How can I fix this?

9
  • 4
    Three backticks are only for code blocks. For inline code, use a single backtick. I'm not sure if this is what's causing the problem or not, but other than this, everything you posted here looks perfectly fine, so it's worth a try. Commented Jul 8, 2023 at 11:28
  • 2
    @CodyGray-onstrike Inline code is delimited by an arbitrary number of backticks. However the current SO software does not handle inline backticks correctly. See the CommonMark spec.
    – philipxy
    Commented Jul 8, 2023 at 19:54
  • @CodyGray-onstrike I tried one back-tick and that didn't display the inline code as inline. To make it render as inline code, I had to use four white-spaces. Commented Jul 8, 2023 at 20:40
  • @philipxy can you provide a link to the "CommonMark spec"? Commented Jul 8, 2023 at 20:42
  • If the system thinks that my post "appears to contain code..." why doesn't it just tell what the suspicious/problematic code is? Commented Jul 8, 2023 at 20:43
  • @CodyGray-onstrike spec.commonmark.org/0.30/#code-spans (see link at meta.stackexchange.com/editing-help)
    – philipxy
    Commented Jul 8, 2023 at 21:42
  • 2
    To close voters: this question is not specific to Stack Overflow only. The code filter mentioned in this question is enabled on multiple sites on the network, not just Stack Overflow. This question can be equally applied to other sites with the same filter. Commented Jul 9, 2023 at 1:21
  • There are six trailing spaces in it (which doesn't appear to come from the HTML). Though that isn't expected to cause problems. The HTML part is 623 characters. Commented Jul 9, 2023 at 9:49
  • 1
    Re "why doesn't it just tell what the suspicious/problematic code is?": Indeed. It is an illness of modern software to only provide generic and unspecific error messages (essentially "An error occurred" and nothing else), even if the software has the information. Commented Jul 9, 2023 at 10:05

0

You must log in to answer this question.

Browse other questions tagged .