Jump to content

j1979

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

j1979's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. yes my post is perhaps a little unclear. the original line of code works, and does have the echo statment. what i want to do is capture the value of <input type='hidden' name='tbclient[total]' value='total'>. i need this because i need to send a session variable in the $format. something like session_start(); $total = <input type='hidden' name='tbclient[total]' value='total'>; $_SESSION['paypal'] = $total ;
  2. hello all, i hope someone can help, i am trying to make a PHP variable from a hidden form variable. the page already has the value i need and the correct value is displayed. <span class='summary betrag_rechts'> <span id='summary_total'>total <span> ".$this->currency."</span></span> <input type='hidden' name='tbclient[total]' value='total'> </span><br /> but i need the value of "total" as a $php type variable. is this possible? thanks
  3. Thank you everyone i appreciate the help provided. I have posted on the forum dedicated to the component some time ago (march 7th) but no reply. i think the author is busy and not able to reply. i hope someone here is able to help a little more i have used var dump with theses results... each radio button outputs something similar to this: object(stdClass)#125 (11) { ["id"]=> string(2) "35" ["srv_type"]=> string(2) "65" ["category"]=> string(5) "radio" ["checked"]=> string(1) "0" ["pro_rata"]=> string(0) "" ["ordering"]=> string(1) "5" ["published"]=> string(1) "1" ["rate"]=> string(2) "49" ["type"]=> string(30) "Collection or Delivery options" ["catid"]=> string(2) "75" ["name"]=> string(37) } OR object(stdClass)#126 (11) { ["id"]=> string(2) "32" ["srv_type"]=> string(2) "65" ["category"]=> string(5) "radio" ["checked"]=> string(1) "1" ["pro_rata"]=> string(0) "" ["ordering"]=> string(1) "2" ["published"]=> string(1) "1" ["rate"]=> string(2) "24" ["type"]=> string(30) "Collection or Delivery options" ["catid"]=> string(2) "75" ["name"]=> string(57) } the value i need to output from the $record object is which ever has the value "radio" ["checked"]=> string(1) "1" and i need it to return the value located here ["rate"]=> string(2) "24" does anyone have a link or some advice how to output this value? thanks in advance.
  4. ^ Thank you for the quick response what totally baffles me (and it does not take much) is that the value in this line echo " <input type='hidden' name='wert_".$record->category.$service_index."' value='".$pax/$pax*$record->rate."'>\n"; gives the correct result. i just want to create a PHP variable that has the same value as the code above. so that i can send this to the paypal page $_SESSION['paypal'] = the value of the code above.
  5. // additional services if (count($this->add_services_items)>0) { echo "<div id='box_services_rechts'>\n"; echo " <fieldset>\n"; echo " <legend>".JText::_('TB On Top')."</legend>\n"; // $typ_id = $this->add_services_items[0]->srv_type; $typ_id = $this->add_services_items[0]->type; // $typ_id = NULL; $index = 0; $service_index = 0; echo "<div class='tb_services_start' id='tb_services0'>".$this->add_services_items[0]->type."</div>\n"; foreach ($this->add_services_items as $record) { if ( $typ_id != $record->type ) { $service_index++; echo "<div class='tb_services' id='tb_services".$service_index."'>".$record->type."</div>\n"; } if ( $record->checked ) { $checked = "checked='checked'"; } else { $checked = ''; } echo " <input type='".$record->category."' id='cb".$service_index.$index."' name='".$record->category.$service_index."' value='".$record->name."' ".$checked."> ".$record->name." (".number_format($record->rate, 0, ',', '.')." ".$this->currency.")<br />\n"; echo " <input type='hidden' name='value_".$record->category.$service_index."' value='".$record->pro_rata." ".number_format($record->rate, 0, ',', '.')." ".$this->currency."'>\n"; echo " <input type='hidden' name='wert_".$record->category.$service_index."' value='".$pax/$pax*$record->rate."'>\n"; $typ_id = $record->type; $index++; $_SESSION['paypal']=$rate_total+$record->rate; } } ...... this last line ( $_SESSION['paypal']=$rate_total+$record->rate; ) is giving the result but of the wrong radio button.
  6. hello all.. i am using a Joomla Component called travelbook for my site and am almost there with my quest to integrate paypal.. but my total price sent to paypal is wrong.. the code i am editing uses 2 variables that i need to add together and pass to paypal. the first variable is ok $rate_total, when i use $_SESSION['paypal']=$rate_total this works perfectly. the second variable i need to send has an operator i don't understand the second variable is chosen by the user via a radio button.. if a user picks the top option at £12.. the variable sends the amount linked to one of the other radio button options. i can only find 1 variable in the code $record->rate (but i belevie the operator in the middle is changing the radio button option) but i can't find anywhere an example of this operator in PHP. so from my testing $record->rate is the only variable i can use but this is always sending the integer value from one of the other radio buttons and not the button chosen by the user does anyone know how i can make $record->rate equal a new variable with the correct option chosen by the user. sorry if this is a very basic question but i have never done any PHP and not any programming for at least 10 years
×
×
  • 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.