0

hi can anyone tell me how i can achive this.
i have a product to sell online and will use alertpay but i have some additional information i want the user to fill in before they press the buy button to take the to the payment area.user must give the detail name address email ect.. and there domain name and some other stuff and i want when they press buy the form is submit to my email and also at the same time take them to the payment are.

can someone help out please

2
Contributors
11
Replies
14
Views
6 Years
Discussion Span
Last Post by Dragonbaki
0

Nothing probs.., Just get the value that the users have entered.. and then validate it., Suppose,

$name=$_POST['username'];
if($name!="")
{
header('Location:payment.php');
}
else
{
echo "Sorry.. We need your all details to make your payment better..";
exit;
}

This is a simple way.. Try this to use it in detail way for your application..
Hope you understand., If still any probs, pls let me know...

0

thanks for the help but one thing i dont understand.is can i make the pay now button submit the from and take the user to the alertpay payment page.what you are showing me is some sort off validation before the paynow button can be press right?

0

Hmmm.... Such sort of validation will be passed means, the header function at line 4 will redirect to whatever page you defined inside there... So if you want to just make sure that the user has entered in the relevant field this much is okay., That header function surely redirects the user to the relevant page as your wish.

Suppose if you still feel bad., just post me with some brief details. I will try to show you much better...

0

iv put a sample code of what im trying to achive take a look at it and let me know how i can go about it.its only html code

<html>
<head>
</head>





<body>

<table align="center">

<form method="post" action="https://www.alertpay.com/PayProcess.aspx">

<tr>
<th colspan="2" align="left"><h1>Enter your personal Information</h1></th>
</tr>

<tr>
<td>Name:</td>
<td><input name="name_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<td>Surname:</td>
<td><input name="surname_field" type="text" size="25" value=""></input></td>
</tr>


<tr>
<td>Name:</td>
<td><input name="name_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<td>ID Number:</td>
<td><input name="id_field" type="text" size="25" value=""></input></td>
</tr>


<tr>
<td>Date Of Birth:</td>
<td><select name=dobm_field tabindex="9">
<option value=""></option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
<select name=dobd_field tabindex="10" >
<option value=""></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select></td>
</tr>


<tr>
<td>Tel:</td>
<td><input name="tel_field" type="text" size="15" value=""></input></td>
</tr>

<tr>
<td>Address:</td>
<td><input name="ads_field" type="text" size="25" value=""></input></td>
</tr>


<tr>
<td>Email:</td>
<td><input name="email_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<td>Company Name:</td>
<td><input name="comp_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<th colspan="2" align="left"><h1>Setup your website</h1></th>
</tr>

<tr>
<td>Site Title:</td>
<td><input name="sa1_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<th colspan="2" align="left">Please Provide a Domain name of your choice.use the domain check to check your domain avidility.
 </th>
</tr>


<tr>
<td>Site Address 1:</td>
<td><input name="sa1_field" type="text" size="25" value=""></input><select><option>.com</option><option>.net</option><option>.org</option><option>.info</option></select>Domaincheck</td>
</tr>


<tr>
<th colspan="2" align="left">Please provide at lease three email address for you new account you dont need</br> to right the domain just the name.
The domain will be added at the end of you email address</br> prior to your available sitename choosen above.
</th>
</tr>

<tr>
<td>Email Address 1:</td>
<td><input name="sa1_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<td>Email Address 2:</td>
<td><input name="sa1_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<td>Email Address 3:</td>
<td><input name="sa1_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<td>Email Address 4:</td>
<td><input name="sa1_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<td>Email Address 5:</td>
<td><input name="sa1_field" type="text" size="25" value=""></input></td>
</tr>

<tr>
<td></td>
<td></td>
</tr>




<tr>

<td> </td>
<td><input type="hidden" name="ap_productid" value="DxVnKkNK4eOgcBSeiJfiyA=="/>
    <input type="hidden" name="ap_quantity" value="1"/>
    <input type="image" src="https://www.alertpay.com/Images/BuyNow/pay_now_11.gif"/></td>

</tr>


</form>
</table>


</body>

</html>
0

In the above of your code., there is no submit button to pass the value to the relevant page... If you press the submit button, you can get the value at relevant page as i mentioned earlier and then you can process as i said...

0

so i need a submit button can i use the alertpay buy now button to submit the form and at the same time take me to payment page?

0

ok thanks but then what will happen to this line of code

<input type="hidden" name="ap_productid" value="DxVnKkNK4eOgcBSeiJfiyA=="/>
    <input type="hidden" name="ap_quantity" value="1"/>
    <input type="image" src="https://www.alertpay.com/Images/BuyNow/pay_now_11.gif"/>

which is a hidden field for the check out button received from alertpay.

0

one more thing is there a way i can make the form store the information in a variable , php file or something that the form will submit only if payment is successful.cause after payment is done you will be redirected to thankyou page or something so the form data will be send when that page is reached.theres lots of site that does this so how is it done.

0

Nothing worry.. In the posting page [ (i.e) payment page ] receive these values in a variable as follows and use it wherever you want..

$a=$_POST;
$b=$_POST;

That's all...

Edited by Dragonbaki: n/a

0

This is an idea for your next question..

// Your form page..
<form action="payment.php" method="post">
.....
// Your asusual code for getting the values needed from user..
....
</form>

// This is payment page..
$a=$_POST['username'];
.....   // Here, just retrieving all the values that the user have entered in variables

if(some condition for checking the user provided the valid details and payment success)
{
header('Location:thankyou.html');
}
else
{
echo "Payment error";
}

// In thankyou.html page, you can display the thanks information...

This is a simple idea.. Use it in detail..
I cant get you fully.. So only i just gave you some hints...
Hope you understand this.. If any probs, pls let me know...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.