Jump to content

flash script worked perfectly with an ASP form... but now needs to work with PHP

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Emil

Emil

    Newbie

  • Members
  • PipPip
  • 11 posts
hi.
I have the flash script that has worked perfectly with an ASP form... but now the site has moved to a windows server and i think the script may have to be adjusted.
One thing I did in the flash form was change "mail.asp" for the script inside flash..

here is the command script we created in flash:

on (release, keyPress "<Enter>") {

nextFrame();

Body = text;

from = text;

loadVariablesNum("jmail.php", 0, "POST");

}

here is the php i need to adjust: "gdform.php"
I would like modify it so it emails from this server: smtp.secureserver.net

here is the php i need to adjust:

<?php

    $request_method = $_SERVER["REQUEST_METHOD"];

    if($request_method == "GET"){

      $query_vars = $_GET;

    } elseif ($request_method == "POST"){

      $query_vars = $_POST;

    }

    reset($query_vars);

    $t = date("U");


    $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;

    $fp = fopen($file,"w");

    while (list ($key, $val) = each ($query_vars)) {

     fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");

     fputs($fp,"$val\n");

     fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");

     if ($key == "redirect") { $landing_page = $val;}

    }

    fclose($fp);

    if ($landing_page != ""){

	header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");

    } else {

	header("Location: http://".$_SERVER["HTTP_HOST"]."/");

    }

?>

Edited by Emil, 04 May 2011 - 02:37 PM.


#2
Calgon

Calgon

    Learning Programmer

  • Members
  • PipPipPip
  • 56 posts
Well, first you might want to change the file extension from 'jmail.asp' to 'jmail.php' - seeing as PHP requires that as a file extension.

#3
Emil

Emil

    Newbie

  • Members
  • PipPip
  • 11 posts
we did that. any other thoughts on this ?
thanks

Calgon said:

Well, first you might want to change the file extension from 'jmail.asp' to 'jmail.php' - seeing as PHP requires that as a file extension.


#4
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
  • Location:New York, NY
Is your host Godaddy?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users