PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Old November 9th, 2012, 04:04 PM
Soo Soo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 15 Soo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 24 sec
Reputation Power: 0
PHP and MySql

I have confused myself no end and I am not sure how to explain my predicament. I am trying to reduce my inventory (in MySql database) by the amount of purchases a customer has made, but I can't seem to figure out which php variables to use. My last attempt was:-

<code>
<?php

require_once 'connectdb.php';
if (isset($totalCount)){
if(($totalCount)!="" && !empty($totalCount)) {
$totalCount = $_POST[$totalCount];
$panname = $_POST['panname'];

}

// Select product table and reduce inventory quantity by purchased quantity

$query = ("UPDATE $pans SET $row[stock]=stock-{'$totalCount'} WHERE panname = {'$panname'}");

// Function: update_record()
// submit the query to the database
$results = @mysql_query($query, $connection);
if (!results) {
die(mysql_error());
}
?>
<close code>

What ever I try does not seem to make any reductions in my inventory. I have four previous pages of scripting, and I am not sure which php coding I require to extract the details from the customer's form input to initiate the action.

I hope you understand this, I know you will require the form details, but as stated above I am not sure which bit to attach because I don't know which script is associated with the action I require. I have attempted the script about six times with different coding from prior pages. I am sorry it is so vague, but I hope you can put me on the right track. Thanks

Reply With Quote
Old November 11th, 2012, 03:58 PM
Sleeping Troll Sleeping Troll is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 5 Sleeping Troll User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 20 sec
Reputation Power: 0
Where are your values coming from?

Reply With Quote
Old November 12th, 2012, 10:35 AM
Soo Soo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 15 Soo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 24 sec
Reputation Power: 0
Quote:
Originally Posted by Sleeping Troll
Where are your values coming from?


Quote:
This is my problem, I'm not sure where it should come from. I have the following scripts:-


[CODE]
<php>
if(!isset($_SESSION['basketItems'])) {
$_SESSION['basketItems'] = Array();
}

// Check to see if products have been purchased and update quantities appropriately
if(isset($_POST['updateQty'])) {
foreach($_SESSION['basketItems'] as $target) {
$cTarget = 'cartItem_'.$target['name'];
$cQuantity = 'itemQuantity_'.$target['name'];
if(isset($_POST[$cTarget])) {
if($_POST[$cQuantity] != $target['count']) {
$basketText = "Item quantity updated : " . $target['niceName'] ;
if($_POST[$cQuantity] == 0) {
unset($_SESSION['basketItems'][$target['name']]);
} else {
$_SESSION['basketItems'][$target['name']]['count'] = $_POST[$cQuantity];
?>
[CLOSE CODE]

Quote:
or is it a bit from:-


[CODE]
<?php

// Inform the customer of the cost of the items purchased together with post & packaging

foreach($_SESSION['basketItems'] as $target) {

echo '<tr>';
echo '<td>'.$target['niceName'].'</td>';
echo '<td>'.$target['count'].'</td>';
echo '<td>'.number_format(($target['panPrice']/100), 2, '.', '').'</td>';
echo '</tr>';
$totalPrice += ($target['count'] * $target['panPrice']);
$totalCount += $target['count'];
}
?>
[CLOSE CODE]

Quote:
or is it a bit from:-


[CODE]
<?php
<h2>Credit Card Details</h2>

<form name = "checkout" method="POST" action="exit.php"
<p>
<input type="text" name= "cardNumber" <?php echo $_POST['cardNumber'].""; ?> size="20" />

<input type="submit" name="submit" value="Purchase Pans" />
<input type="hidden" name="orderTotal" value= <?php echo $totalPrice; ?>" />
</p>
</form>
?> [CLOSE CODE]

Quote:
or is it a bit from:-


[CODE]
<?php

echo '<form name="cartForm" method="POST" action="cartaction.php">';

echo "<table padding=\"3\">"; // start the cart display formatting

// Call the purchased Session items, add and print to cart checkout page

foreach($_SESSION['basketItems'] as $bItem) {

$output = '<tr>';
$output .= '<input type="hidden" name="cartItem_'.$bItem['name'].'" value="'.$bItem['name'].'" />';
$output .= '<td><img src="'.$bItem['panImage'].'" alt="'.$bItem['niceName'].'" title="'.$bItem['niceName'].'" /></td>';
$output .= '<td>' . $bItem['niceName'] . '</td>';
$output .= "<td><input type='text' value='".$bItem['count']."' size='2' maxlength='2' name='itemQuantity_".$bItem['name']."' /></td>";
$output .= "<td><input type='submit' name='updateQty' value='Update This One Item' size='20' maxlength='20' /></td>";
$output .= '</tr>';

echo $output;
}
echo '</table>';
echo '</form>';
?> [CLOSE CODE]

Quote:
or none of the above. (The above code is on two separate pages)

Reply With Quote
Old November 13th, 2012, 09:05 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Galway
Posts: 1,437 DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Month 3 Days 20 h 56 m 48 sec
Reputation Power: 9
Code:
if (isset($totalCount)){ 
does $totalcount exist?
 it does exist
if(($totalCount)!="" && !empty($totalCount)) {
 if its not blank, and its not empty go in here

$totalCount = $_POST[$totalCount]; 
why declare it again?
$panname = $_POST['panname'];

}

you are redeclaring the variable, are you doing that intentionally?
__________________
When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car.

Last edited by DavidMR : November 13th, 2012 at 09:08 AM.

Reply With Quote
Old November 13th, 2012, 11:14 AM
Soo Soo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 15 Soo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 24 sec
Reputation Power: 0
Quote:
Originally Posted by DavidMR
Code:
if (isset($totalCount)){ 
does $totalcount exist?
 it does exist
if(($totalCount)!="" && !empty($totalCount)) {
 if its not blank, and its not empty go in here

$totalCount = $_POST[$totalCount]; 
why declare it again?
$panname = $_POST['panname'];

}

you are redeclaring the variable, are you doing that intentionally?


No, just don't know what I am doing. Originally I was getting error messages telling me that items were not declared, so just covered all bases. I have now removed the extra script and it hasn't thrown up an error, BUT it is also still not decreasing my inventory??? [/QUOTE]

Reply With Quote
Old November 13th, 2012, 11:17 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Galway
Posts: 1,437 DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Month 3 Days 20 h 56 m 48 sec
Reputation Power: 9
Quote:
Originally Posted by Soo
No, just don't know what I am doing. Originally I was getting error messages telling me that items were not declared, so just covered all bases. I have now removed the extra script and it hasn't thrown up an error, BUT it is also still not decreasing my inventory???


is the update query correct? echo it out and check (paste it here if you can)

Reply With Quote
Old November 14th, 2012, 01:59 PM
Soo Soo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 15 Soo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 24 sec
Reputation Power: 0
Quote:
Originally Posted by DavidMR
is the update query correct? echo it out and check (paste it here if you can)


I have a feeling that it is more than likely Not Correct, but I can't figure out where to take the query input from. I am getting nothing at all from echoing it out (providing of course that I am doing that right also - My brain has completely fogged over! [/QUOTE]

Reply With Quote
Old November 14th, 2012, 02:36 PM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Galway
Posts: 1,437 DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Month 3 Days 20 h 56 m 48 sec
Reputation Power: 9
do you have a php errors file? you could echo text at various parts of the script including where the update query is running, this could identify where the issue is.

also put a die(); after echoing the q uery so you can see it, if you dont see it then, there could be a chance its not going into the section where the update is.
example, replace
PHP Code:
 $query = ("UPDATE $pans SET $row[stock]=stock-{'$totalCount'} WHERE panname = {'$panname'}");

// Function: update_record()
// submit the query to the database
$results = @mysql_query($query$connection);
if (!
results) {
die(
mysql_error());



with:
PHP Code:
 $query = ("UPDATE $pans SET $row[stock]=stock-{'$totalCount'} WHERE panname = {'$panname'}");
//NOTE 1
echo $query;
// Function: update_record()
// submit the query to the database
$results = @mysql_query($query$connection);
//Note2
if (!$results
die(
mysql_error());



Note1 is what i added, Note2 is where you had an error and left out a $.

Last edited by DavidMR : November 14th, 2012 at 02:39 PM.

Reply With Quote
Old November 15th, 2012, 10:22 AM
pennaseo pennaseo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 1 pennaseo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 51 sec
Reputation Power: 0
Thumbs up PHP and MySql

s this code is worked .... i used this code in my site phpden.

Reply With Quote
Old November 15th, 2012, 11:30 AM
Soo Soo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 15 Soo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 24 sec
Reputation Power: 0
Quote:
Originally Posted by DavidMR
do you have a php errors file? you could echo text at various parts of the script including where the update query is running, this could identify where the issue is.

also put a die(); after echoing the q uery so you can see it, if you dont see it then, there could be a chance its not going into the section where the update is.
example, replace
PHP Code:
 $query = ("UPDATE $pans SET $row[stock]=stock-{'$totalCount'} WHERE panname = {'$panname'}");

// Function: update_record()
// submit the query to the database
$results = @mysql_query($query$connection);
if (!
results) {
die(
mysql_error());



with:
PHP Code:
 $query = ("UPDATE $pans SET $row[stock]=stock-{'$totalCount'} WHERE panname = {'$panname'}");
//NOTE 1
echo $query;
// Function: update_record()
// submit the query to the database
$results = @mysql_query($query$connection);
//Note2
if (!$results
die(
mysql_error());



Note1 is what i added, Note2 is where you had an error and left out a $.


I have ini_set('display_errors',1);
error_reporting(E_ALL); to catch any errors and nothing is appearing at the moment. I put your Note 1 (and 2) in and am getting nothing returned on that, so would therefore assume that I do not have the right script in there in the first instance. I even tried changing SET $row[stock] to just stock
eg: $query = ("UPDATE pans SET stock=stock-{'$totalCount'} WHERE panname = {'$panname'}");
but no joy [/QUOTE]

Reply With Quote
Old November 16th, 2012, 04:29 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Galway
Posts: 1,437 DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Month 3 Days 20 h 56 m 48 sec
Reputation Power: 9
Are you able to echo anything on that script? If so, where can you echo stuff? What do you see when the page is submitted?

Reply With Quote
Old November 16th, 2012, 01:54 PM
Soo Soo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 15 Soo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 24 sec
Reputation Power: 0
Quote:
Originally Posted by DavidMR
Are you able to echo anything on that script? If so, where can you echo stuff? What do you see when the page is submitted?


Nothing seems to be echoing at all. All that is showing is:

Your Order
Thank you for purchasing your pans.

The sum of 25.49 will be debited from your Visa card.

Go Back Home

No matter where I echo, nothing shows and nothing is reduced in the stock table.

This is the complete script on this page (exit.php)
Code:
<?php 
session_start();

setlocale(LC_MONETARY, 'en_GB');

ini_set('display_errors',1);
error_reporting(E_ALL);

$error = false;
$_SESSION['errorMessage'] = array();

// initialise our functions

function CCvalidate($cardNumber, $cardType)  
{
  // Validate store card format
  
  if ((preg_match('/^([P-Z1-6]{16})$/', $cardNumber) || preg_match('/^([P-Z]{4}[1-6]{4}[P-Z]{4}[1-6]{4})$/', $cardNumber)) && strlen($cardNumber)>15) 
  { // A & B Store Card
    return true;

  } else   {

$_SESSION['errorMessage'][] = "You have entered your card details incorrectly, please correct and try again, thank you"; 
     return false; 
  }
}

// Check that we have the required variables and they're not just 
// empty. If we don't, then go back to the form page

if(isset($_POST['cardNumber'])) {
  if(empty($_POST['cardNumber'])||$_POST['cardNumber']=="") {  
    $error = true;
    $_SESSION['errorMessage'][] = '<p>You have not entered a card number, please try again</p>';
  }
} else {
	$error = true;
	$_SESSION['errorMessage'][] = '<p>You have not entered a card number, please try again</p>';	
}

if (isset($_POST['cardNumber'])){
    if($_POST['cardNumber']!="" && !empty($_POST['cardNumber'])) {
      $cardNumber = $_POST['cardNumber'];
      $cardType = $_POST['cardType'];

      if(!CCvalidate($cardNumber, $cardType)){
          $error = true;
          $_SESSION['errorMessage'][] = '<p>You have not entered a card number, please try again</p>';
      }
    } 
}

// check to see if we have errors and redirect
if($error==true){
    header('Location: checkout.php');
    exit();
}

require_once 'connectdb.php'; 
if (isset($totalCount)){
    if(($totalCount)!="" && !empty($totalCount)) {
[$totalCount];
$panname = $_POST['panname'];

	}

// Select product table and reduce inventory quantity by purchased quantity

	
$query = ("UPDATE $pans SET $row[stock]=stock-{'$totalCount'} WHERE panname = {'$panname'}");
echo $query;
// Function:	update_record()
	// submit the query to the database 
	$results = @mysql_query($query, $connection);					
	if (!$results) {
	die(mysql_error());
echo $results;
}
}

require_once 'connectdb.php'; 
if (isset($_POST['cardNumber'])){
if($_POST['cardNumber']!="" && !empty($_POST['cardNumber'])) {
    	$cardnumber = $_POST['cardNumber'];
    	$totalcost = $_POST['orderTotal'];

	}

// Keep record of purchased items for this customer 
	$query = @"INSERT INTO transactions VALUES ('$_POST[cardNumber]', '$_POST[orderTotal]')";
	// submit the query to the database 
	$results = mysql_query($query, $connection);					
	if (@!$results) {
	die(mysql_error());
	}
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />	
<title>Checkout and Order Your Selected Pans</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
</head>
<body>

<div id="header">
	<h1>Your Order</h1>
</div>

<div id="mainblock">

	<p>Thank you for purchasing your pans.</p>
	
<p>The sum of  <?php echo number_format(($_POST['orderTotal']/100), 2, '.', ''); ?> will be debited from your <?php echo ($_POST['cardType']); ?> card.</p>

</div>

<div id="footer">
<ul class="navlist">
	<li><a href="index.php">Go Back Home</a></li>
</ul>
</div>

</body>
</html>

Quote:
With the echo $query inserted twice to try and get some response. ???

Reply With Quote
Old November 18th, 2012, 04:12 AM
Soo Soo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 15 Soo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 24 sec
Reputation Power: 0
[QUOTE=Soo]Nothing seems to be echoing at all. All that is showing is:

Your Order
Thank you for purchasing your pans.

The sum of 25.49 will be debited from your Visa card.

Go Back Home

No matter where I echo, nothing shows and nothing is reduced in the stock table.

This is the complete script on this page (exit.php)
Code:
<?php 
session_start();

setlocale(LC_MONETARY, 'en_GB');

ini_set('display_errors',1);
error_reporting(E_ALL);

$error = false;
$_SESSION['errorMessage'] = array();

// initialise our functions

function CCvalidate($cardNumber, $cardType)  
{
  // Validate store card format
  
  if ((preg_match('/^([P-Z1-6]{16})$/', $cardNumber) || preg_match('/^([P-Z]{4}[1-6]{4}[P-Z]{4}[1-6]{4})$/', $cardNumber)) && strlen($cardNumber)>15) 
  { // A & B Store Card
    return true;

  } else   {

$_SESSION['errorMessage'][] = "You have entered your card details incorrectly, please correct and try again, thank you"; 
     return false; 
  }
}

// Check that we have the required variables and they're not just 
// empty. If we don't, then go back to the form page

if(isset($_POST['cardNumber'])) {
  if(empty($_POST['cardNumber'])||$_POST['cardNumber']=="") {  
    $error = true;
    $_SESSION['errorMessage'][] = '<p>You have not entered a card number, please try again</p>';
  }
} else {
	$error = true;
	$_SESSION['errorMessage'][] = '<p>You have not entered a card number, please try again</p>';	
}

if (isset($_POST['cardNumber'])){
    if($_POST['cardNumber']!="" && !empty($_POST['cardNumber'])) {
      $cardNumber = $_POST['cardNumber'];
      $cardType = $_POST['cardType'];

      if(!CCvalidate($cardNumber, $cardType)){
          $error = true;
          $_SESSION['errorMessage'][] = '<p>You have not entered a card number, please try again</p>';
      }
    } 
}

// check to see if we have errors and redirect
if($error==true){
    header('Location: checkout.php');
    exit();
}

require_once 'connectdb.php'; 
if (isset($totalCount)){
    if(($totalCount)!="" && !empty($totalCount)) {
[$totalCount];
$panname = $_POST['panname'];

	}

// Select product table and reduce inventory quantity by purchased quantity

	
$query = ("UPDATE $pans SET $row[stock]=stock-{'$totalCount'} WHERE panname = {'$panname'}");
echo $query;
// Function:	update_record()
	// submit the query to the database 
	$results = @mysql_query($query, $connection);					
	if (!$results) {
	die(mysql_error());
echo $results;
}
}

require_once 'connectdb.php'; 
if (isset($_POST['cardNumber'])){
if($_POST['cardNumber']!="" && !empty($_POST['cardNumber'])) {
    	$cardnumber = $_POST['cardNumber'];
    	$totalcost = $_POST['orderTotal'];

	}

// Keep record of purchased items for this customer 
	$query = @"INSERT INTO transactions VALUES ('$_POST[cardNumber]', '$_POST[orderTotal]')";
	// submit the query to the database 
	$results = mysql_query($query, $connection);					
	if (@!$results) {
	die(mysql_error());
	}
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />	
<title>Checkout and Order Your Selected Pans</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
</head>
<body>

<div id="header">
	<h1>Your Order</h1>
</div>

<div id="mainblock">

	<p>Thank you for purchasing your pans.</p>
	
<p>The sum of  <?php echo number_format(($_POST['orderTotal']/100), 2, '.', ''); ?> will be debited from your <?php echo ($_POST['cardType']); ?> card.</p>

</div>

<div id="footer">
<ul class="navlist">
	<li><a href="index.php">Go Back Home</a></li>
</ul>
</div>

</body>
</html>

Reply With Quote
Old November 19th, 2012, 05:52 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Galway
Posts: 1,437 DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level)DavidMR User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Month 3 Days 20 h 56 m 48 sec
Reputation Power: 9
PHP Code:
if (isset($totalCount)){ 


This is around your update query but its not defined?

Reply With Quote
Old November 19th, 2012, 12:58 PM
Soo Soo is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 15 Soo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 24 sec
Reputation Power: 0
Quote:
Originally Posted by DavidMR
PHP Code:
if (isset($totalCount)){ 


This is around your update query but its not defined?


Does this count? On another page linked with session_start();at the head of both pages?


Code:
<?php
		
$totalPrice = 0;
$totalPostage = 0;
$totalCount = 0;
		
// Inform the customer of the cost of the items purchased together with post & packaging

foreach($_SESSION['basketItems'] as $target) {
				
echo '<tr>';
echo '<td>'.$target['niceName'].'</td>';
echo '<td>'.$target['count'].'</td>';
echo '<td>'.number_format(($target['panPrice']/100), 2, '.', '').'</td>';
echo '</tr>';			
$totalPrice += ($target['count'] * $target['panPrice']);
$totalCount += $target['count'];
}
			
if($totalCount == 1) {
$totalPostage = 350;
} else if ($totalCount == 0) {
$totalPostage = 0;
} else if ($totalPrice > 6000) {
$totalPostage = 750;
} else {
$totalPostage = 350 + (200 * ($totalCount - 1));
}
			
$totalPrice += $totalPostage;
			
?>

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > PHP and MySql


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap