Sellerprice Times Profit Equals Price

Sellerprice Times Profit Equals Price

The syntax needs changed on the update form. I have an update form that allows a user to change the sellerprice. When the form is submitted, there is a calculation of the "sellerprice" field times "profit" field equals "price" field. (price column is where the data is stored in the products table).

Profit field has a default of 1.03. It is included in the Recordset. There is a hiddenfield with profit data binded to it.

Note: If it was a static (constant) calculation then I would just leave the 1.03 in the syntax and wouldn't need a profit field. But it varies.

Proper Syntax with Calculation That Works:

GetSQLValueString($_POST['sellerprice']*1.03, "text"),

Proper Syntax with Calculations That Don't Work:

GetSQLValueString($_POST['sellerprice']*['profit'], "text"),

GetSQLValueString($_POST['sellerprice'*'profit'], "text"),

GetSQLValueString($_POST['sellerprice']*<?php echo $row_rsUploadImages['profit']; ?>, "text"),


[url removed, login to view]

Scripting Language: PHP with MySQL Database

Send me a private message regarding your approach to making this work and the results of the work in completing this project here.


COMPLETE UPDATE SCRIPT (that works with 1.03 but not using the profit field)

$editFormAction = $_SERVER['PHP_SELF'];

if (isset($_SERVER['QUERY_STRING'])) {

$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);


if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "secureform")) {

$updateSQL = sprintf("UPDATE products SET image0=%s, image1a=%s, image1b=%s, image2a=%s, image2b=%s, image3a=%s, image3b=%s, image4a=%s, image4b=%s, image5a=%s, image5b=%s, image6a=%s, image6b=%s, image7a=%s, image7b=%s, image8a=%s, image8b=%s, image9a=%s, image9b=%s, image10a=%s, image10b=%s, image11a=%s, image11b=%s, image12a=%s, image12b=%s, image13a=%s, image13b=%s, image14a=%s, image14b=%s, image15a=%s, image15b=%s, price=%s WHERE productnumber=%s",

GetSQLValueString($_POST['image0'], "text"),

GetSQLValueString($_POST['image1a'], "text"),

GetSQLValueString($_POST['image1b'], "text"),

GetSQLValueString($_POST['image2a'], "text"),

GetSQLValueString($_POST['image2b'], "text"),

GetSQLValueString($_POST['image3a'], "text"),

GetSQLValueString($_POST['image3b'], "text"),

GetSQLValueString($_POST['image4a'], "text"),

GetSQLValueString($_POST['image4b'], "text"),

GetSQLValueString($_POST['image5a'], "text"),

GetSQLValueString($_POST['image5b'], "text"),

GetSQLValueString($_POST['image6a'], "text"),

GetSQLValueString($_POST['image6b'], "text"),

GetSQLValueString($_POST['image7a'], "text"),

GetSQLValueString($_POST['image7b'], "text"),

GetSQLValueString($_POST['image8a'], "text"),

GetSQLValueString($_POST['image8b'], "text"),

GetSQLValueString($_POST['image9a'], "text"),

GetSQLValueString($_POST['image9b'], "text"),

GetSQLValueString($_POST['image10a'], "text"),

GetSQLValueString($_POST['image10b'], "text"),

GetSQLValueString($_POST['image11a'], "text"),

GetSQLValueString($_POST['image11b'], "text"),

GetSQLValueString($_POST['image12a'], "text"),

GetSQLValueString($_POST['image12b'], "text"),

GetSQLValueString($_POST['image13a'], "text"),

GetSQLValueString($_POST['image13b'], "text"),

GetSQLValueString($_POST['image14a'], "text"),

GetSQLValueString($_POST['image14b'], "text"),

GetSQLValueString($_POST['image15a'], "text"),

GetSQLValueString($_POST['image15b'], "text"),

GetSQLValueString($_POST['sellerprice']*1.03, "text"),

GetSQLValueString($_POST['MM_recordId'], "int"));

mysql_select_db($database_aplusconn, $aplusconn);

$Result1 = mysql_query($updateSQL, $aplusconn) or die(mysql_error());

$updateGoTo = "/sellitem/images/";

if (isset($_SERVER['QUERY_STRING'])) {

$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";

$updateGoTo .= $_SERVER['QUERY_STRING'];


header(sprintf("Location: %s", $updateGoTo));



Beceriler: Adobe Dreamweaver, MySQL, PHP, Betik Yükleme, SQL

Daha fazlasını gör: webpage language, scripting job, n equals, job price, static webpage, profit, profit making, database calculations, update images mysql database php, recordset, static calculation, _post exit, install https, php script echo, image change location, image mysql database using php, php calculations, php price update script, update calculations mysql, update images database php, echo script php, php script update image, send https, calculation php form, php image update database script

İşveren Hakkında:
( 31 değerlendirme ) Antioch, United States

Proje NO: #737178



I can fix this today

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% USD
(20 Değerlendirme)

Bu iş için 4 freelancer ortalamada $146 teklif veriyor


Can fix this. Thanks...

in %bids___i_period_sub_35% gün içinde150%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(61 Değerlendirme)

Please pefer PMB for details,Thanks.

in %bids___i_period_sub_35% gün içinde250%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

I am intested to do this work

in %bids___i_period_sub_35% gün içinde150%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)