Page 1 of 1

getting variables to the function page...?

Posted: Thu Apr 14, 2005 3:05 pm
by glennn3
i'm having a hard time getting these two variables passed to the formprocess.php page for the mail(); funtion:

Code: Select all

<td width="555" valign="middle"><form action="formprocess.php" method="post">
        <input type="hidden" name="function" value="subscribe"> 
        <table width="532" border="0" cellpadding="0" cellspacing="1">
          <tr>
            <td width="530">
              <br>
              <table width="457" border="0" cellpadding="0" cellspacing="1">
                <tr>
                  <td align="center" class="Georgia146"></td>
                </tr>
              </table>
              <br>
              <table width="533" border="0" cellpadding="0" cellspacing="1">
                <!--DWLayoutTable-->
                <tr>
                  <td width="82" height="22" align="right"><font color="#990000">First Name</font></td>
                  <td colspan="2"><input type="text" name="name" size="40"></td>
                </tr>
                <tr>
                  <td height="22" align="right"><font color="#990000">email</font </td>
                  <td colspan="2"><input name="email" type="text" id="email" size="40"></td>


like so:

Code: Select all

$name=$_POST["name"];
	$email=$_POST["email"];
	$narrative=$_POST["narrative"];
	$nn=$_POST["nn"];
	$ws=$_POST["ws"];
	$fields=array($name,$lastname,$street1,$city,$state,$zip,$country,$username,$password,$email);
	$fieldsverbose=array('name','lastname','street1','city','state','zip','country','username','password','email');
	$error="The following required fields were left blank:<br>";
	
	 mail($email, $subject,$content, "From: Narrative Magazine");
	
	
	if(mysql_query($query))
		setcookie('username', $username, time()+(1800), '/', '', 0);
		print("<script language=\"javascript\">
				top.location=\"105/login.php\";
				</script>");
can someone tell me what i'm doing wrong?

Thanks much,
g

Posted: Thu Apr 14, 2005 3:28 pm
by Chris Corbyn
"name" and "email" aren't transmitting correctly?

Can they even be echoed directly onto the page?

I don't really see an error in there :?

Posted: Thu Apr 14, 2005 3:32 pm
by shiznatix
i dont see really whats going on. maybe posting a lil more code might help but if not try echoing out $_POST['email'] and $_POST['name'] at the beginning of the new file and see if they are processing correctly?

EDIT: i obviously dont type fast enough :P