Jump to content

Recommended Posts

Hi people,

 

Im more of a web designer than coder, so Im struggling with this.

 

Basic form I have, works fine, but this form needs to create a unique page with a link with all the form values.

 

its basically for a payment link - they click the email link on the email, the page has a button to pay which sends all those values via POST.

 

 

 

Form has -

 

Email address (to sent link to page)

Value

Description

Customer Name

 

 

any advice would be great!

 

kind regards,

 

J

Link to comment
https://forums.phpfreaks.com/topic/244763-form-submit-to-create-new-page/
Share on other sites

Sorry Voip, i only have a basic form at the moment, as I dont know how to create a page with the payment link -

 

<p>Please click on the button below to pay for your order.</p>
<form action="/app/payment.pl" method="post"> 

  <p>
  <input name="pay_to_email" type="hidden" value="info@..." /> 
    
  <input name="status_url" type="hidden" value="orders@..." /> 
    
  <input name="language" type="hidden" value="EN" /> 
    
  <input name="currency" type="hidden" value="GBP" />
  </p>
<p>Customer Name:
    <input name="Name" type="text" value="" /> 
  </p>
<p>Customer Email:
    <input name="Name" type="text" value="" /> 
  </p>
  <p>Amount to pay:
    <input name="amount" type="text" value="" /> 
  </p>
  <p>
   Product Details: <input name="detail1_description" type="text" value="Product Decription" title="" />
  </p>
  <p>
   Payment Decription: <input name="detail1_text" type="text" value="" /> 
  </p>
  <p>
    <input type="submit" value="Click to pay" />
  </p>
</form>

 

this works fine to actually go to the payment and put car details in but I need this to create a link with the values and email the customer with the link to the page or something.

 

Thank you

 

kindly

 

J

 

 

Ok, after some thought, creating a page for each submission and emailing them the link to the page...for the payment link is going around the houses lol

 

how can I get that form to create a link with all the variables like ie:

 

https://www.site.com/app/payment.pl?pay_to_email=info%40site.co.uk&status_url=orders%40site.co.uk&language=EN&amount=7.99&currency=GBP&detail1_description=product+description&detail1_text=product+more+details

 

If the form could create a link like this and send them an email saying, "please click this link etc for your payment LINK etc, thank you" ??

 

 

best regards,

 

J

 

<?
if($_POST['submit'])
{

	$headers = "MIME-Version: 1.0\r\n";
	$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
	$headers.= 'From: site.com<[email protected]>' ."\r\n";

   

	$verifyemail  = "Buyer email address";

	$mail_body="<a href="https://www.site.com/app/payment.pl?pay_to_email=info%40site.co.uk&status_url=orders%40site.co.uk&language=EN&amount=7.99&currency=GBP&detail1_description=product+description&detail1_text=product+more+details">Payme NOw</a>";

	if (mail($verifyemail,"Pay NOW", $mail_body,$headers))
	{	echo "email send";	}
	else
	{	echo "email faild";	}
?>

something like -

 

$mail_body="<a href="https://www.site.com/app/payment.pl?pay_to_email=info%40site.co.uk&status_url=orders%40site.co.uk&language=EN&amount='.$amount.'&currency=GBP&detail1_description='$detail1_description'&detail1_text='$detail1_text'">Click here to pay</a>";

 

hmmm??

<?
if($_POST['submit'])
{

	$headers = "MIME-Version: 1.0\r\n";
	$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
	$headers.= 'From: 99pitt.info <[email protected] >' ."\r\n";

   

	$verifyemail  = "Buyer email address";

	$mail_body="https://www.site.com/app/payment.pl?pay_to_email=".
	$_GET['pay_to_email']."&status_url=".$_GET['status_url']."&language=EN&amount=".$_GET['amount']."&currency=GBP&detail1_description=".$_GET['detail1_description']."&detail1_text=". $_GET['detail1_text']."";

	if (mail($verifyemail,"Pay NOW", $mail_body,$headers))
	{	echo "email send";	}
	else
	{	echo "email faild";	}
?>

<p>Please click on the button below to pay for your order.</p>
<form action="/app/payment.pl" method="post">   
<p>  
<input name="pay_to_email" type="hidden" value="[email protected]" />
<input name="status_url" type="hidden" value="[email protected]" />       
<input name="language" type="hidden" value="EN" />
<input name="currency" type="hidden" value="GBP" />  
</p> 

<p>Customer Name:    
<input name="Name" type="text" value="" />   
</p> <p>Customer Email:    
<input name="Name" type="text" value="" />   
</p>  <p>Amount to pay:    
<input name="amount" type="text" value="" />   
</p>  
<p>   Product Details: 
<input name="detail1_description" type="text" value="Product Decription" title="" />
</p>  
<p>   Payment Decription: 
<input name="detail1_text" type="text" value="" />
</p>  
<p>    
<input type="submit" value="Click to pay" /> 
</p>
</form>

Im having issues with the code,

 

getting this error when viewing the page,

 

Parse error: syntax error, unexpected $end in /home/ukcanvas/public_html/payment-link.php on line 44

 

but created a .html and it shows most of the php mail code above the form below, but once submitted it goes to the payment site perfectly ok, but it doesnt email the email link??

 

here is my full .php

 


<?php
if($_POST['submit'])
{	
	$headers = "MIME-Version: 1.0\r\n";
	$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
	$headers.= 'From: Payment Link - <[email protected] >' ."\r\n";
	$verifyemail= .$_POST['email'];			
	$mail_body="https://www.site.com/app/payment.pl?pay_to_email=".$_GET['pay_to_email']."&status_url=".$_GET['status_url']."&language=EN&amount=".$_GET['amount']."&currency=GBP&detail1_description=".$_GET['detail1_description']."&detail1_text=". $_GET['detail1_text']."";

	if (mail($verifyemail,"Click here to pay!", $mail_body,$headers))
	{	echo "email sent";	}
	else
	{	echo "email failed";	}
?>

<p>Please enter customers details to send payment link.</p>
<form action="/app/payment.pl" method="post">   
<input name="pay_to_email" type="hidden" value="[email protected]" />
<input name="status_url" type="hidden" value="[email protected]" />       
<input name="language" type="hidden" value="EN" />
<input name="currency" type="hidden" value="GBP" />  

<p>Customer Name:    
<input name="Name" type="text" value="" />   
</p> <p>Customer Email:    
<input name="email" type="text" value="" />   
</p>  <p>Amount to pay:    
<input name="amount" type="text" value="" />   
</p>  
<p>   Product Details: 
<input name="detail1_description" type="text" value="" title="" />
</p>  
<p>   Payment Decription: 
<input name="detail1_text" type="text" value="" />
</p>  
<p>    
<input type="submit" value="Click to pay" />
</form>

 

 

thank you so much!

 

 

kindly

 

J

Creat a new page and test this code

<?

$from    = "mysite.com <[email protected] >";

$headers = "MIME-Version: 1.0\r\n";

$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";

$headers.= "From: $from\r\n";

 

 

$verifyemail  = "[email protected]";

 

$mail_body="Test mail";

 

if (mail($verifyemail,"Customer contact", $mail_body,$headers))

{ echo " Thankyou! - Your feedback has been sent! "; }

else

{ echo " Thankyou! - We could not send email. Please try later! "; }

 

 

?>

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.