HTML/PHP: How do I input checkboxes and radio buttons from a form into php, email said form, and redirect to a separate page?

I am working on a form where the user is creating a character for a game. In this, I want it to email me the information for storage and reference. The code is a bit lengthy, so here are some links:

HTML
PHP

This HTML page will link from the user clicking links based on their character preferences, so some of the radio buttons are already filled in. I also want to limit the number of checkboxes the user can select, hence the javascript at the bottom. What I am looking to do is find a way to send the answers the user inputs to me. The issue on this part is that I’ve seen answers that others gave to similar questions, but I haven’t fully understood what it was they were doing because of how new I am to PHP.

The second part (that links to the first part) is that I don’t know how to send the answers as an email. I have tried, but so far I have failed to send anything. (As you can tell in the PHP, the “to” and “from” both say “myemail”. That’s because I’m not sending anything back to the user. I just want it to send me their answers.)

The final part is that I want it to link to another website when they hit “submit”. For right now, it just links to Google. I can successfully link it when I’m not trying to send an email, but it doesn’t work when I do try.

If I can get help on any of these problems, that would be great. Thank you.


Source: forms

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.