how to take cash from user

with function

  • (2 Pages)
  • +
  • 1
  • 2

29 Replies - 2277 Views - Last Post: 12 August 2009 - 02:11 AM Rate Topic: -----

#1 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

how to take cash from user

Posted 10 August 2009 - 01:16 AM

ok this works in another part of the game but i need to make this take 1000 evrytime they rename i have put the function in but looks like i need to call it

<?php require_once('../Connections/stablemaster.php'); 

session_start();

function deduct_cost($rename, $uid)
	{
		$Fee = 1000 * $rename;
		$query = "SELECT Cash FROM users WHERE id='".$uid."'";
		$dbdata = mysql_query($query,$this->dblink);
		$row = mysql_fetch_array($dbdata);
		if($row['Cash'] < $Fee)
		{
			return "<b>You don't have enough cash to rename your jock!</b><br>";
		}
		$Cash = $row['Cash'] - $Fee;
		$query = "UPDATE users SET Cash='".$Cash."' WHERE id='".$uid."'";
		mysql_query($query,$this->dblink);
		return NULL;		
	}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
	$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
	case "text":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;	
	case "long":
	case "int":
	  $theValue = ($theValue != "") ? intval($theValue) : "NULL";
	  break;
	case "double":
	  $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
	  break;
	case "date":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "defined":
	  $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
	  break;
  }
  return $theValue;
}
}

$id = $_POST['jocky'];$newname = $_POST['buy_jocky_name'];$str = "UPDATE jocky_stats SET jocky_name='$newname' WHERE jocky_name='$id'";mysql_query($str)or die(mysql_error());

mysql_select_db($database_stablemaster, $stablemaster);
$stable_nameQ = mysql_query("SELECT stable_name FROM users WHERE id='".$_SESSION['uid']."'");
$stable_nameA = mysql_fetch_assoc($stable_nameQ);
$query_Recordset1 = "SELECT jocky_stats.jocky_name FROM jocky_stats WHERE `stable_name` = '".$stable_nameA['stable_name']."';";
$Recordset1 = mysql_query($query_Recordset1, $stablemaster) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);


?><style type="text/css">
<!--
body {
	background-image: url(../Images/grass-natural.jpg);
}
-->
</style><form action="<?php echo $_SERVER['PHP_SELF'];?>"
 method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="39%">Select Jocky</td>
<td width="61%"><select name="jocky" id="jocky">
<option value="" <?php if (!(strcmp("", $row_Recordset1['Jocky_name']))) {echo "selected=\"selected\"";} ?>>select jocky</option>
<?php
do { 
?>
<option value="<?php echo $row_Recordset1['jocky_name']?>"<?php if (!(strcmp($row_Recordset1['jocky_name'], $row_Recordset1['jocky_name']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset1['jocky_name']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select></td>
</tr>
<tr>
<td>Type in NewName Here </td>
<td><input name="buy_jocky_name" type="text" size="30" maxlength="25" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="rename jocky" id="rename jocky" value="Rename " /></td>
</tr>
</table>
</form>
<p>&nbsp;</p>

</body>
</html>
<?php
mysql_free_result($Recordset1);

?>



this will be used on several different sheets the function i need to call is at the top

This post has been edited by peter yianni: 10 August 2009 - 02:27 AM


Is This A Good Question/Topic? 0
  • +

Replies To: how to take cash from user

#2 paperclipmuffin   User is offline

  • Disassembling...
  • member icon

Reputation: 13
  • View blog
  • Posts: 944
  • Joined: 16-April 09

Re: how to take cash from user

Posted 10 August 2009 - 01:21 AM

Hi! :)

What exactly is the problem you are having? What is going wrong?

Thanks! :)
Was This Post Helpful? 0
  • +
  • -

#3 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

Re: how to take cash from user

Posted 10 August 2009 - 01:42 AM

View Postpaperclipmuffin, on 10 Aug, 2009 - 12:21 AM, said:

Hi! :)

What exactly is the problem you are having? What is going wrong?

Thanks! :)



well its not taking the money from the users
i have been testing renamed a few and the money is the same
Was This Post Helpful? 0
  • +
  • -

#4 Wimpy   User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: how to take cash from user

Posted 10 August 2009 - 01:44 AM

Do you call the function when a user has done a successful rename? :)

View Postpeter yianni, on 10 Aug, 2009 - 10:42 AM, said:

well its not taking the money from the users
i have been testing renamed a few and the money is the same

Was This Post Helpful? 0
  • +
  • -

#5 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

Re: how to take cash from user

Posted 10 August 2009 - 01:51 AM

View PostWimpy, on 10 Aug, 2009 - 12:44 AM, said:

Do you call the function when a user has done a successful rename? :)

View Postpeter yianni, on 10 Aug, 2009 - 10:42 AM, said:

well its not taking the money from the users
i have been testing renamed a few and the money is the same



yes when sucsessful

here the rest of the code i have now added the rest took out the bad names
$uid = $_SESSION['uid'];

function deduct_cost($rename, $uid)
	{
		$Fee = 1000 * $rename;
		$query = "SELECT Cash FROM users WHERE id='".$uid."'";
		$dbdata = mysql_query($query,$this->dblink);
		$row = mysql_fetch_array($dbdata);
		if($row['Cash'] < $Fee)
		{
			return "<b>You don't have enough cash to rename your jock!</b><br>";
		}
		$Cash = $row['Cash'] - $Fee;
		$query = "UPDATE users SET Cash='".$Cash."' WHERE id='".$uid."'";
		mysql_query($query,$this->dblink);
		return NULL;		
	}

function checkname(&$name)
{
	$errors   = array();
	$badwords = array("cunt",");
	$Jocky_name  = stripslashes(trim($name));
	$length   = strlen($Jocky_name);

	if ($length < 5 || $length > 20)
	{
		$errors[] .= "Name must be of a length between 5-20 characters!";
	}

	if ( ! eregi('^[[:alnum:]\?\!\-\_\'\-]', $Jocky_name))
	{
		$errors[] .= "You're name must contain only letters, numbers and the following characters: .?! - _";
	}

	$Jocky_name = mysql_real_escape_string($Jocky_name);
	$query   = "SELECT Jocky_name FROM jocky_stats WHERE Jocky_name = '$Jocky_name'";
	$result  = mysql_query($query);

	if (mysql_num_rows($result) > 0)
	{
		$errors[] .= "This name is not availible.";
	}

	if (in_array($Jocky_name,$badwords))		{		
	$errors[] = "names are not aloud to contain foul language.";	   
	}		
	return $errors;
	
} 

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  if (PHP_VERSION < 6) {
	$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
	case "text":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "long":
	case "int":
	  $theValue = ($theValue != "") ? intval($theValue) : "NULL";
	  break;
	case "double":
	  $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
	  break;
	case "date":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "defined":
	  $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
	  break;
  }
  return $theValue;
}
}


$errors = checkname($_POST['buy_jocky_name']);
if(count($errors) > 0)
{
	foreach($errors as $e)
	{
		echo $e."<br />";
	}
} 
else 
{

$id = $_POST['jocky'];$newname = $_POST['buy_jocky_name'];$str = "UPDATE jocky_stats SET jocky_name='$newname' WHERE jocky_name='$id'";mysql_query($str)or die(mysql_error());
}
mysql_select_db($database_stablemaster, $stablemaster);
$stable_nameQ = mysql_query("SELECT stable_name FROM users WHERE id='".$_SESSION['uid']."'");
$stable_nameA = mysql_fetch_assoc($stable_nameQ);
$query_Recordset1 = "SELECT jocky_stats.jocky_name FROM jocky_stats WHERE `stable_name` = '".$stable_nameA['stable_name']."';";
$Recordset1 = mysql_query($query_Recordset1, $stablemaster) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);


?><style type="text/css">
<!--
body {
	background-image: url(../Images/grass-natural.jpg);
}
-->
</style><form action="<?php echo $_SERVER['PHP_SELF'];?>"
 method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="39%">Select Jocky</td>
<td width="61%"><select name="jocky" id="jocky">
<option value="" <?php if (!(strcmp("", $row_Recordset1['Jocky_name']))) {echo "selected=\"selected\"";} ?>>select jocky</option>
<?php
do { 
?>
<option value="<?php echo $row_Recordset1['jocky_name']?>"<?php if (!(strcmp($row_Recordset1['jocky_name'], $row_Recordset1['jocky_name']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset1['jocky_name']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select></td>
</tr>
<tr>
<td>Type in NewName Here </td>
<td><input name="buy_jocky_name" type="text" size="30" maxlength="25" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="rename jocky" id="rename jocky" value="Rename " /></td>
</tr>
</table>
</form>
<p>&nbsp;</p>

</body>
</html>
<?php
mysql_free_result($Recordset1);

?>


Was This Post Helpful? 0
  • +
  • -

#6 Wimpy   User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: how to take cash from user

Posted 10 August 2009 - 01:54 AM

You never call the "deduct_cost" function in that code! You should perhaps call from here:
$errors = checkname($_POST['buy_jocky_name']);
if(count($errors) > 0)
{
	foreach($errors as $e)
	{
		echo $e."<br />";
	}
}
else
{
	deduct_cost(/*proper parameters here*/);
	// Other code
}


Was This Post Helpful? 0
  • +
  • -

#7 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

Re: how to take cash from user

Posted 10 August 2009 - 02:15 AM

View PostWimpy, on 10 Aug, 2009 - 12:54 AM, said:

You never call the "deduct_cost" function in that code! You should perhaps call from here:
$errors = checkname($_POST['buy_jocky_name']);
if(count($errors) > 0)
{
	foreach($errors as $e)
	{
		echo $e."<br />";
	}
}
else
{
	deduct_cost(/*proper parameters here*/);
	// Other code
}



can u show me how to put in please

}
else
{

deduct_cost($rename);
if($row['Cash'] < $Fee)
{
return "<b>You don't have enough cash to rename your jock!</b><br>";
}

{

i get a error at the end of page
Parse error: syntax error, unexpected $end in /customers/stablemaster.org/stablemaster.org/httpd.www/Jocky Finance/Rename Jock.PHP on line 161

This post has been edited by peter yianni: 10 August 2009 - 02:22 AM

Was This Post Helpful? 0
  • +
  • -

#8 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

Re: how to take cash from user

Posted 10 August 2009 - 02:51 AM

ok ihave removed from the top and writen down the end i keep geting a error though here what i have got now

<?php
require_once('../Connections/stablemaster.php');
session_start();
$uid = $_SESSION['uid'];

function checkname(&$name)
{
	$Fee = 1000 * $Fee;
	$errors   = array();
	$badwords = array("");
	$Jocky_name  = stripslashes(trim($name));
	$length   = strlen($Jocky_name);

	if ($length < 5 || $length > 20)
	{
		$errors[] .= "Name must be of a length between 5-20 characters!";
	}

	if ( ! eregi('^[[:alnum:]\?\!\-\_\'\-]', $Jocky_name))
	{
		$errors[] .= "You're name must contain only letters, numbers and the following characters: .?! - _";
	}

	$Jocky_name = mysql_real_escape_string($Jocky_name);
	$query   = "SELECT Jocky_name FROM jocky_stats WHERE Jocky_name = '$Jocky_name'";
	$result  = mysql_query($query);

	if (mysql_num_rows($result) > 0)
	{
		$errors[] .= "This name is not availible.";
	}

	if (in_array($Jocky_name,$badwords))		{		
	$errors[] = "names are not aloud to contain foul language.";	   
	}		
	return $errors;
	
} 

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  if (PHP_VERSION < 6) {
	$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
	case "text":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "long":
	case "int":
	  $theValue = ($theValue != "") ? intval($theValue) : "NULL";
	  break;
	case "double":
	  $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
	  break;
	case "date":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "defined":
	  $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
	  break;
  }
  return $theValue;
}
}


$errors = checkname($_POST['buy_jocky_name']);
if(count($errors) > 0)
{
	foreach($errors as $e)
	{
		echo $e."<br />";
	}

		$cash = ($Fee);
		$query = "SELECT Cash FROM users WHERE id='".$uid."'";		
		$result  = mysql_query($query);

		if($row['Cash'] < $Fee)
		{
			return "<b>You don't have enough cash to rename your jock!</b><br>";
		}
 
else 
{
		$Cash = $row['Cash'] - $Fee;				
			
	}
{

$id = $_POST['jocky'];$newname = $_POST['buy_jocky_name'];$str = "UPDATE jocky_stats SET jocky_name='$newname' WHERE jocky_name='$id'";mysql_query($str)or die(mysql_error());
}
mysql_select_db($database_stablemaster, $stablemaster);
$stable_nameQ = mysql_query("SELECT stable_name FROM users WHERE id='".$_SESSION['uid']."'");
$stable_nameA = mysql_fetch_assoc($stable_nameQ);
$query_Recordset1 = "SELECT jocky_stats.jocky_name FROM jocky_stats WHERE `stable_name` = '".$stable_nameA['stable_name']."';";
$Recordset1 = mysql_query($query_Recordset1, $stablemaster) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);


?><style type="text/css">
<!--
body {
	background-image: url(../Images/grass-natural.jpg);
}
-->
</style><form action="<?php echo $_SERVER['PHP_SELF'];?>"
 method="post" name="form1" id="form1">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="39%">Select Jocky</td>
<td width="61%"><select name="jocky" id="jocky">
<option value="" <?php if (!(strcmp("", $row_Recordset1['Jocky_name']))) {echo "selected=\"selected\"";} ?>>select jocky</option>
<?php
do { 
?>
<option value="<?php echo $row_Recordset1['jocky_name']?>"<?php if (!(strcmp($row_Recordset1['jocky_name'], $row_Recordset1['jocky_name']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset1['jocky_name']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select></td>
</tr>
<tr>
<td>Type in NewName Here </td>
<td><input name="buy_jocky_name" type="text" size="30" maxlength="25" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="rename jocky" id="rename jocky" value="Rename " /></td>
</tr>
</table>
</form>
<p>&nbsp;</p>

</body>
</html>



Parse error: syntax error, unexpected $end in /customers/stablemaster.org/stablemaster.org/httpd.www/Jocky Finance/Rename Jock.PHP on line 148
Was This Post Helpful? 0
  • +
  • -

#9 RudiVisser   User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1010
  • View blog
  • Posts: 3,566
  • Joined: 05-June 09

Re: how to take cash from user

Posted 10 August 2009 - 03:45 AM

My latest project is a code former which you certainly need :D

That error means that you're missing a closing brace (}) somewhere.
Was This Post Helpful? 0
  • +
  • -

#10 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

Re: how to take cash from user

Posted 10 August 2009 - 03:54 AM

View PostMageUK, on 10 Aug, 2009 - 02:45 AM, said:

My latest project is a code former which you certainly need :D

That error means that you're missing a closing brace (}) somewhere.



ok that did somthing found the closing error
had 5.93146+16
in acount now have 0 lol that should have took 1000

code now looks like this

<?php
require_once('../Connections/stablemaster.php');
session_start();
$uid = $_SESSION['uid'];

function checkname(&$name)
{
	$Fee = 1000 * $Fee;
	$errors   = array();
	$badwords = array("");
	$Jocky_name  = stripslashes(trim($name));
	$length   = strlen($Jocky_name);

	if ($length < 5 || $length > 20)
	{
		$errors[] .= "Name must be of a length between 5-20 characters!";
	}

	if ( ! eregi('^[[:alnum:]\?\!\-\_\'\-]', $Jocky_name))
	{
		$errors[] .= "You're name must contain only letters, numbers and the following characters: .?! - _";
	}

	$Jocky_name = mysql_real_escape_string($Jocky_name);
	$query   = "SELECT Jocky_name FROM jocky_stats WHERE Jocky_name = '$Jocky_name'";
	$result  = mysql_query($query);

	if (mysql_num_rows($result) > 0)
	{
		$errors[] .= "This name is not availible.";
	}

	if (in_array($Jocky_name,$badwords))		{		
	$errors[] = "names are not aloud to contain foul language.";	   
	}		
	return $errors;
	
} 

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  if (PHP_VERSION < 6) {
	$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
	case "text":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "long":
	case "int":
	  $theValue = ($theValue != "") ? intval($theValue) : "NULL";
	  break;
	case "double":
	  $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
	  break;
	case "date":
	  $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
	  break;
	case "defined":
	  $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
	  break;
  }
  return $theValue;
}
}


$errors = checkname($_POST['buy_jocky_name']);
if(count($errors) > 0)
{
	foreach($errors as $e)
	{
		echo $e."<br />";
	}

		$cash = ($Fee);
		$query = "SELECT Cash FROM users WHERE id='".$uid."'";		
		$result  = mysql_query($query);

		if($row['Cash'] < $Fee)
		{
			return "<b>You don't have enough cash to rename your jock!</b><br>";
		}
 
else 

	 
		$Cash = $row['Cash'] - $Fee;				
		$query = "UPDATE users SET Cash='".$Cash."' WHERE id='".$uid."'";
		$result  = mysql_query($query);
		   
	}
{

$id = $_POST['jocky'];$newname = $_POST['buy_jocky_name'];$str = "UPDATE jocky_stats SET jocky_name='$newname' WHERE jocky_name='$id'";mysql_query($str)or die(mysql_error());
}
mysql_select_db($database_stablemaster, $stablemaster);
$stable_nameQ = mysql_query("SELECT stable_name FROM users WHERE id='".$_SESSION['uid']."'");
$stable_nameA = mysql_fetch_assoc($stable_nameQ);
$query_Recordset1 = "SELECT jocky_stats.jocky_name FROM jocky_stats WHERE `stable_name` = '".$stable_nameA['stable_name']."';";
$Recordset1 = mysql_query($query_Recordset1, $stablemaster) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);



This post has been edited by peter yianni: 10 August 2009 - 03:55 AM

Was This Post Helpful? 0
  • +
  • -

#11 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

Re: how to take cash from user

Posted 10 August 2009 - 09:25 AM

so any idea why its taking everthing from acount and not just the specified 1000
Was This Post Helpful? 0
  • +
  • -

#12 RudiVisser   User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1010
  • View blog
  • Posts: 3,566
  • Joined: 05-June 09

Re: how to take cash from user

Posted 10 August 2009 - 09:34 AM

I haven't had a look fully through the code, but if $Fee is what's being deducted, then this is wrong:
$Fee = 1000 * $Fee;

Was This Post Helpful? 0
  • +
  • -

#13 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

Re: how to take cash from user

Posted 10 August 2009 - 09:55 AM

View PostMageUK, on 10 Aug, 2009 - 08:34 AM, said:

I haven't had a look fully through the code, but if $Fee is what's being deducted, then this is wrong:
$Fee = 1000 * $Fee;


yes thats what was being decuted any idea how to fix please
Was This Post Helpful? 0
  • +
  • -

#14 RudiVisser   User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1010
  • View blog
  • Posts: 3,566
  • Joined: 05-June 09

Re: how to take cash from user

Posted 10 August 2009 - 10:05 AM

Well look at the code, you're trying to times 1000 by $Fee, which at present doesn't exist.

Even if it did you wouldn't get the expected result.. Why isn't $Fee just set to 1000?
Was This Post Helpful? 0
  • +
  • -

#15 peter yianni   User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 310
  • Joined: 04-June 09

Re: how to take cash from user

Posted 10 August 2009 - 10:39 AM

View PostMageUK, on 10 Aug, 2009 - 09:05 AM, said:

Well look at the code, you're trying to times 1000 by $Fee, which at present doesn't exist.

Even if it did you wouldn't get the expected result.. Why isn't $Fee just set to 1000?


sorry thats a old post i did try to change to just 1000

$fee = 1000;

but it kept bringing in errors
i was trying to figure out what i should put there

also tried

$Fee = (1000);
and a few others

also tried $Fee = array ("1000");

This post has been edited by peter yianni: 10 August 2009 - 10:40 AM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2