Hi I have a form and a paypal subscribe button in the same page. I want to subscribe button when clicked to submit the form (email it to me) before it redirects to paypal for payment.
<!--THE CONTACT FORM-->
<center>
<form action="createUser.php" method="POST">
<input id="email" type="email" name="email" placeholder= "Email Address" required value= <?php echo htmlspecialchars($_POST['email1']); ?> >
<br>
<input id="fullName" type="text" name="fullName" placeholder="Your Full Name" required value= <?php echo htmlspecialchars($_POST['fullName1']); ?>>
<br>
<input id="tel" type="tel" name="tel" placeholder="Your Number" required>
<br>
<center>
</center>
</form>
<!--THE CONTACT FORM-->
<!--Paypal Button-->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="DLNYHMF3A6TUE">
<input type="submit" value="Add to Cart" name="submit" class="paypal_btn">
</form>
<!--Paypal Button-->