Hey Everyone, hope you are all well...
I have a little subscribe form at inkmedic.com
it is a php include, when you click the submit link, the jquery plugin 'lighwindow' opens the elist.php file and should submit the form, however the email information from the form is not carrying over into the php script and i'm getting blank responses

this is the form, eform.php, pulled in with the include on each page

<form method="POST" name="elist" id="elist" onSubmit="return submitForm(this.submitbutton)">
<input type="text" name="Email" size="20"  />
&nbsp;&nbsp;
          <a href="../elist.php" params="lightwindow_width=420,lightwindow_height=100,lightwindow_form=elist" id="norm" class="lightwindow" rel="submitForm"><button>Submit</button></a> 
</form>

this is the php page, elist.php

<?php

// get posted data into local variables
$EmailFrom = $_POST['Email'];
$EmailTo = "info@inkmedic.com";
$Subject = "Ink Medic E-list Subscription";

// customer information

$Email = Trim(stripslashes($_POST['Email'])); 

// customer information
$Body = "";
$Body .= "Customer Information ";
$Body .= "\n";
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";

// send email 
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

?>


<style type="text/css">
div#ipsum {
padding: 20px;
font-size:14px;
text-align:center;
line-height: 12px;
}

h2#pop {
font-size:20px;
top: 10px;
}

#norm2 {
background-image:none;
}
</style>			
			
<div id="ipsum">
	<p>
		<h2 id="pop">Thanks for joining our email list!</h2>
	</p>
    <p>&nbsp;</p>
	<p>
		<a href="../" id="norm2" class="lightwindow_action" rel="deactivate"><strong>close</strong></a>
	</p>
</div>

im just getting into jquery and php so it's probably very obvious...

thanks for any help!

and if you could help me run an email validation that would be awesome! but i can save that for another thread, i need it for the contact form as well...

you can't link to the page to submit a form. The <a href="../elist.php"><button>Submit</button></a> should be

<input type="submit" value="Submit" />

Side note: There is absolutely no reason to use javascript to submit that form.

you can't link to the page to submit a form. The <a href="../elist.php"><button>Submit</button></a> should be

<input type="submit" value="Submit" />

Side note: There is absolutely no reason to use javascript to submit that form.

thanks for the button tip, however when submit is clicked, instead of going to the confirmation page, i need lightwindow to pull it up in the little box

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.