Jump to content

noobie question


j1979

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/202086-noobie-question/
Share on other sites

This has what to do with Ajax?

 

If you already have an echo statement echoing your form (its VERY unclear from your snippet) then its simply....

 

<input type='hidden' name='tbclient[total]' value='$total'>

 

otherwise.....

 

<input type='hidden' name='tbclient[total]' value='<?php echo $total; ?>'>

Link to comment
https://forums.phpfreaks.com/topic/202086-noobie-question/#findComment-1059789
Share on other sites

This has what to do with Ajax?

 

If you already have an echo statement echoing your form (its VERY unclear from your snippet) then its simply....

 

<input type='hidden' name='tbclient[total]' value='$total'>

 

otherwise.....

 

<input type='hidden' name='tbclient[total]' value='<?php echo $total; ?>'>

 

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 ;

 

 

Link to comment
https://forums.phpfreaks.com/topic/202086-noobie-question/#findComment-1059986
Share on other sites

Archived

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

×
×
  • 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.