Jump to content

Form submit to create new page


jhmedia

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
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

 

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

thank you for your time,

 

i can get this to work perfectly from the form, but we need it to sent a recipient a email with a generated link with these values, so they click and then can therefore arrive at payment site?

 

best regards,

 

J

Link to comment
Share on other sites

<?
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<no-reply@site.com>' ."\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";	}
?>

Link to comment
Share on other sites

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??

Link to comment
Share on other sites

<?
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 <no-reply@99pitt.info >' ."\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="info@ukcanvas.co.uk" />
<input name="status_url" type="hidden" value="orders@ukcanvas.co.uk" />       
<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>

Link to comment
Share on other sites

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 - <info@site.com >' ."\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="info@email.com" />
<input name="status_url" type="hidden" value="orders@email.com" />       
<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

Link to comment
Share on other sites

Creat a new page and test this code

<?

$from    = "mysite.com <no-reply@mysite.com >";

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

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

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

 

 

$verifyemail  = "aj123cduk@yahoo.com";

 

$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! "; }

 

 

?>

 

 

Link to comment
Share on other sites

If the code does not work

 

Open the “php.ini“

Search for the attribute called “SMTP” in the php.ini file.

“SMTP=localhost“. change the localhost to the smtp server name of your ISP

“smtp_port” which should be set to 25.

 

 

Link to comment
Share on other sites

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.