Search Unity

Send form mail, help

Discussion in 'Scripting' started by gringofxs, May 5, 2015.

  1. gringofxs

    gringofxs

    Joined:
    Oct 14, 2012
    Posts:
    240
    how can i put a fill box and make an PHP to send me the information, in this java script.

    Code (JavaScript):
    1. function OnMouseDown () {
    2.    if(Input.GetMouseButtonDown(0))
    3.     var url:String = "www.confidentialxcompany.com/appemail/appemail.php";
    4.     var form:WWWForm = new WWWForm();
    5.     form.AddField("companyname","companyname");
    6.     form.AddField("siteaddress","siteaddress");
    7.     var www:WWW = new WWW(url,form);
    8.     Debug.Log("Sending mail");
    9. }