Help

ok this code i have it doesnt give any errors but it wont do what i want it to do any suggestion.

try.php where you get the info
[sup]<?php
$fname = empty($_GET[“fname”]) ? “” : $_GET[“fname”];
$lname = empty($_GET[“lname”]) ? “” : $_GET[“lname”];
$phone = empty($_GET[“phone”]) ? “” : $_GET[“phone”];
$zip = empty($_GET[“zip”]) ? “” : $_GET[“zip”];
$city = empty($_GET[“city”]) ? “” : $_GET[“city”];
$email = empty($_GET[“email”]) ? “” : $_GET[“email”];
$state = empty($_GET[“state”]) ? “” : $_GET[“state”];
$org = empty($_GET[“org”]) ? “” : $_GET[“org”];
$address = empty($_GET[“address”]) ? “” : $_GET[“address”];
?>

Personal information: Name of Organization:
First name:
Last name:
Phone Number:
Email:
Address:
City: State: ZIP:
[/sup]

trystore.php this is storing it to .txt document

[sup]<?php
$fname = empty($_GET[“fname”]) ? “” : $_GET[“fnwme”];
$lname = empty($_GET[“lname”]) ? “” : $_GET[“lname”];
$phone = empty($_GET[“phone”]) ? “” : $_GET[“phone”];
$zip = empty($_GET[“zip”]) ? “” : $_GET[“zip”];
$city = empty($_GET[“city”]) ? “” : $_GET[“city”];
$email = empty($_GET[“email”]) ? “” : $_GET[“email”];
$state = empty($_GET[“state”]) ? “” : $_GET[“state”];
$org = empty($_GET[“org”]) ? “” : $_GET[“org”];
$address = empty($_GET[“address”]) ? “” : $_GET[“address”];
if(!$fname || !$lname || !$phone ||!$zip ||!$city ||!$email ||!$state ||!$org||!$address){header(“location:try.php?fname=$fname&lname=$lname&phone=$phone&zip=$zip&city=$city”);}
else
{
$file = “test.txt”;
$a = fopen($file, “a”);
fwrite($a,$fname."\r\n");
fwrite($a,$lname."\r\n");
fwrite($a,$phone."\r\n");
fwrite($a,$address."\r\n");
fwrite($a,$city."\r\n");
fclose($a);
$a = fopen($file, “r”);
echo “

”;
echo “”;
while(!feof($a))
{
echo “";
}
echo “
Name Telephone Zip Code
”.fgets($a)." ".fgets($a)." ".fgets($a)."
”;
fclose($a);
}
?> [/sup]
Sponsor our Newsletter | Privacy Policy | Terms of Service