fazzfarrell Posted October 18, 2006 Share Posted October 18, 2006 I am trying to pass a result in to this[code]<?php// IntelliCART MX - Add to Cart via Linkif ($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!" Quote Link to comment https://forums.phpfreaks.com/topic/24323-passing-a-variable/ Share on other sites More sharing options...
HuggieBear Posted October 18, 2006 Share Posted October 18, 2006 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.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/24323-passing-a-variable/#findComment-110632 Share on other sites More sharing options...
fazzfarrell Posted October 18, 2006 Author Share Posted October 18, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/24323-passing-a-variable/#findComment-110637 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.