Jump to content
  • Advertisement
Sign in to follow this  
aleksi1578

[web] Making payment page...(php)

This topic is 4662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well I have been trying to solve this fucking thing ages.. and I think now is the time for asking you. I got it counting, but it seems that its screwed up.. It gives me wrong answer.. Ie. If I choose one package thats 7euros and with it one thats 0,25 euros it says it costs only 7 euros what could be the problem? The source is below...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<LINK href="index.files/styles.css" type="text/css rel=stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>payment 2</title>
</head>

<body text="#FFFFFF" background="images/bg_text_main.gif">
<?php 
$address ="xxxxxx@xxxxx.com";
$he ="".$_POST['name']." has just made payment on xxxxxxxxx";
$username ="".$_POST['username']."";
$password ="".$_POST['password']."";
$reguests ="".$_POST['reguests']."";
$package ="".$_POST['package']."";
$pay ="".$_POST['pay']."";
$hmm ="".$_POST['dis']."";
if ($package == "1") {
$package1 ="Starter Package";
}
if ($package == "3") {
$package1 ="Starter Package With Domain";
}
if ($package == "4") {
$package1 ="Normal Package";
}
if ($package == "6") {
$package1 ="Normal Package With Domain";
}
if ($package == "7") {
$package1 ="Special Offer";
}
if ($package == "10") {
$package1 ="Professional Package";
}
if ($package == "11") {
$package1 ="Professional Package With Domain";
}
if ($package == "12") {
$package1 ="Little Business Package";
}
if ($package == "15") {
$package1 ="Med Business Package";
}
if ($package == "18") {
$package1 ="Big Business Package";
}
if ($package == "25") {
$package1 ="Very Big Business Package";
}
if ($_POST['p101'] > 0) {
$p100mb ="".$_POST['p101']."x100mb";
}
if ($_POST['p201'] > 0) {
$p250mb ="".$_POST['p201']."x250mb";
}
if ($_POST['p301'] > 0) {
$p500mb ="".$_POST['p301']."x500mb";
}
if ($_POST['p401'] > 0) {
$p1gb ="".$_POST['p401']."x1gb";
}
if ($_POST['p501'] > 0) {
$pe100mb ="".$_POST['p501']."x100mb to email";
}
if ($_POST['p601'] > 0) {
$pe200mb ="".$_POST['p601']."x200mb to email";
}
if ($_POST['p701'] > 0) {
$pe500mb ="".$_POST['p701']."x500mb to email";
}
if ($_POST['p801'] > 0) {
$pe1gb ="".$_POST['p801']."x1gb to email";
}
if ($_POST['p901'] > 0) {
$pdomain ="".$_POST['p901']."xDomains";
}
if ($_POST['p1001'] > 0) {
$p5gbband ="".$_POST['p1001']."x5gb of bandwidth";
}
if ($_POST['p1101'] > 0) {
$punband ="Unlimited Bandwidth";
}
if ($_POST['b101'] > 0) {
$b100mb ="".$_POST['b101']."x100mb";
}
if ($_POST['b201'] > 0) {
$b250mb ="".$_POST['b201']."x250mb";
}
if ($_POST['b301'] > 0) {
$b500mb ="".$_POST['b301']."x500mb";
}
if ($_POST['b401'] > 0) {
$b1gb ="".$_POST['b401']."x1gb";
}
if ($_POST['b501'] > 0) {
$b2gb ="".$_POST['b501']."x2gb";
}
if ($_POST['b601'] > 0) {
$b5gb ="".$_POST['b601']."x5gb";
}
if ($_POST['b701'] > 0) {
$b10gb ="".$_POST['b701']."x10gb";
}
if ($_POST['b801'] > 0) {
$be100mb ="".$_POST['b801']."x100mb to email";
}
if ($_POST['b901'] > 0) {
$be200mb ="".$_POST['b901']."x200mb to email";
}
if ($_POST['b1001'] > 0) {
$be500mb ="".$_POST['b1001']."x500mb to email";
}
if ($_POST['b1101'] > 0) {
$be1gb ="".$_POST['b1101']."x1gb to email";
}
if ($_POST['b1201'] > 0) {
$be10gb ="".$_POST['b1201']."x10gb to email";
}
if ($_POST['b1301'] > 0) {
$bdomain ="".$_POST['b1301']."xDomains";
}
if ($_POST['b1401'] > 0) {
$b5gbband ="".$_POST['b1401']."x5gb of bandwidth";
}
if ($_POST['b1501'] > 0) {
$bunband ="Unlimited Bandwidth";
}
$name ="".$_POST['name']."";
$message ="Hello here is the information about new customer\n
Name : $name \n
Username : $username \n
Password : $password \n
Reguests or domains etc. : $reguests \n
Package : $package1 \n
Paying : $pay (M = Monthly, Y = Yearly) \n
How many months he decided to be my customer : $hmm \n
Everything he wanted more to his package : \n
Personal : \n
$p100mb \n
$p250mb \n
$p500mb \n
$p1gb \n
$pe100mb \n 
$pe200mb \n
$pe500mb \n
$pe1gb \n
$pdomain \n
$p5gbband \n
$punband \n
Business :  \n
$b100mb \n
$b250mb \n
$b500mb \n
$b1gb \n
$b2gb \n
$b5gb \n
$b10gb \n
$be100mb \n
$be200mb \n
$be500mb \n
$be1gb \n
$be10gb \n
$bdomain \n
$b5gbband \n
$bunband \n
";
mail(
	$address,
	$he,
	$message,
	"From: xxxxxxxx@xxxxx.com"
);
$ptotal =$_POST['p100'] * $_POST['p101'] + $_POST['p200'] * $_POST['p201'] + $_POST['p300'] * $_POST['p301'] + $_POST['p400'] * $_POST['p401'] + $_POST['p500'] * $_POST['p501'] + $_POST['p600'] * $_POST['p601'] + $_POST['p700'] * $_POST['p701'] + $_POST['p800'] * $_POST['p801'] + $_POST['p900'] * $_POST['p901'] + $_POST['p1000'] * $_POST['p1001'] + $_POST['p1100'] * $_POST['p1101'];
$btotal =$_POST['b100'] * $_POST['b101'] + $_POST['b200'] * $_POST['b201'] + $_POST['b300'] * $_POST['b301'] + $_POST['b400'] * $_POST['b401'] + $_POST['b500'] * $_POST['b501'] + $_POST['b600'] * $_POST['b601'] + $_POST['b700'] * $_POST['b701'] + $_POST['b800'] * $_POST['b801'] + $_POST['b900'] * $_POST['b901'] + $_POST['b1000'] * $_POST['b1001'] + $_POST['b1100'] * $_POST['b1101'] + $_POST['b1200'] * $_POST['b1201'] + $_POST['b1300'] * $_POST['b1301'] + $_POST['b1400'] * $_POST['b1401'] + $_POST['b1500'] * $_POST['b1501'];
$total =$ptotal + $btotal + $package;
print "$total";
?> 

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!