Jump to content

Archived

This topic is now archived and is closed to further replies.

fazzfarrell

passing a variable

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!"

Share this post


Link to post
Share on other sites
What do you mean 'pass a result into this'.... The code you've pasted isn't a function.

I'm not sure exactly what you're after with this.

Regards
Huggie

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

×

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.