Jump to content

Recommended Posts

I am trying to pass a result in to this
[code]
<?php
// IntelliCART MX - Add to Cart via Link
if ($HTTP_GET_VARS["imxavl1"]) {
$IMXADD = new addition;
while ($row_rsResultsTitles["ID"] != $HTTP_GET_VARS["imxavl1_id"]) {
$row_rsResultsTitles = mysql_fetch_assoc($rsResultsTitles);
}
$IMXADD->column[] = $row_rsResultsTitles['PackID'];
$IMXADD->column[] = $row_rsResultsTitles['Car'];
$IMXADD->column[] = $row_rsResultsTitles['Items'];
$IMXADD->column[] = $row_rsResultsTitles['Year'];
$IMXADD->column[] = $row_rsResultsTitles['Lang'];
$IMXADD->column[] = $row_rsResultsTitles['Type'];
$IMXADD->column[] = $HTTP_SESSION_VARS['MM_Username'];
$IMXADD->column[] = "1";
$IMXADD->column[] = $SESSION ['$priceA'];
$IMXADD->column[] = $row_rsResultsTitles['Weight'];
$IMXADD->redirect = "results2.php";
$IMXADD->urlparams = preserve($HTTP_GET_VARS,"imxavl1,imxavl1_id");
$IMXADD->addRow($HTTP_SESSION_VARS["icJag"]);
}
$HTTP_GET_VARS = preserve($HTTP_GET_VARS);
?>[/code]

from this?
[code]
<?php
//Rob Farrell and Leyon Nevett: add up price and x by currency
            $number1 = $row_rsResultsTitles['Price'];
$number2 = $row_rsCurrency['Rate'];
            $newnumber = ($number1 * $number2);
echo $english_format_number = number_format($newnumber, 2, '.', '');
$priceA = $english_format_number = number_format($newnumber, 2, '.', '');
echo $priceA;

?>[/code]

Can any one tell me where i am totaly going wrong!"
Link to comment
https://forums.phpfreaks.com/topic/24323-passing-a-variable/
Share on other sites

I have a databe with prices in that appear on the page, when the user chooses Euro it looks up the currency conversion from the the database and uses this to convert the price wich displays on the page.

[code]
<?php
//Rob Farrell and Leyon Nevett: ad up cost x currency
             $number1 = $HTTP_SESSION_VARS["icJag"]->col("Total");
$number2 = $row_rsCurrency['Rate'];
             $newnumber = ($number1 * $number2);
echo $english_format_number = number_format($newnumber, 2, '.', '');

?>[/code]

At the moment the price added comes from [code]$HTTP_SESSION_VARS["icJag"]->col("Total");[/code]

but I want it to come from echo [code]$english_format_number = number_format($newnumber, 2, '.', '');[/cpde][/code]

Looking in to the dode it is passed to the cart via

[code]

<a href="<?php echo $PHP_SELF; ?>?imxavl1=true&imxavl1_id=
<?php echo $row_rsResultsTitles["ID"]; ?>
<?php echo arrToString($HTTP_GET_VARS); ?>">

[/code]
Link to comment
https://forums.phpfreaks.com/topic/24323-passing-a-variable/#findComment-110637
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.