Skip to main content
Participant
April 4, 2018
Answered

How in the world do I incorporate a PHP email into my canvas project?

  • April 4, 2018
  • 1 reply
  • 306 views

All I want is a button, when you press that button the site that I'm hosting sends an email to me with all the info the user put in

literally synonymous with a contact form

currently, this is what I've got going on:

this.button_1.addEventListener("click", TestFunction.bind(this));

function TestFunction()

{

<?php

// the message

$msg = "test_Message";

// use wordwrap() if lines are longer than 70 characters

$msg = wordwrap($msg,70);

// send email

mail("someone@example.com","My subject",$msg);

?>

}

side note:

maybe an easier answer for this is, how do you cherry pick the important parts from javascript

tutorials? like I never see:

<!DOCTYPE html>

<html>

<body>

in HTML canvas documents, but they're always in java script tutorials,

leaving me to believe they're not necessary for canvas projects.

What parts do i incorporate into my code and what parts can I omit?

Thanks a million!

-Joey W

This topic has been closed for replies.
Correct answer Preran

Not the exact answer to your question but this article should provide you with some insights.

kirupa.com - Learn How to Use Flash with PHP and mySQL

1 reply

Legend
April 4, 2018

Do you, in fact, have PHP set up on your server?

Participant
April 4, 2018

Go daddy claims to support PHP.

my main issue is whether or not the code works, or how to cherry pick important parts from javascript tutorials.

Preran
PreranCorrect answer
Legend
April 5, 2018

Not the exact answer to your question but this article should provide you with some insights.

kirupa.com - Learn How to Use Flash with PHP and mySQL