Jump to content

Sydcomebak

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Sydcomebak's Achievements

Member

Member (2/5)

0

Reputation

  1. Fatal error: Cannot access empty property in gdform.php on line 20 Line 20 reads: foreach ($vars as $key->$val){ I think that I see where you are going with this, though... -Dave
  2. I am on a GoDaddy hosted site trying to process a form. First off, the gdform.php: <?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"]."/"); } ?> Looks to me like a recursive function that spits out all data in no particular order. My variables: "Name" - Type: Text "City" - Type: Text "Email" - Type: Text etc... Instrumentalist - Type: Checkbox - Returns "on" if checked Vocalist - Type: Checkbox - Returns "on" if checked etc... What I want is to be able to receive an email that says: Hello, you have received a response from your web form! Bob Smith of Jonesville is a - Vocalist - Instrumentalist - Harmonist ... I assume that this will be accomplished through if and echo statements like: echo $Name; echo " of "; echo $City; echo " is a<br>" if $vocalist == "on" then echo " - Vocalist<br>" ... Am I on the right track? All attempts thus far have failed. Once I get down the right path, I'm sure that I can find the rest of the way. Thanks so much, experts!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.