Jump to content

aoghsshebron

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by aoghsshebron

  1. Put the php variable in a hidden html inputuse javascript to access the inputthis works, save as whatever.php
    <?php ini_set ('display_errors', 1);error_reporting (E_ALL & ~E_NOTICE);$val="hello";print"Value in PHP: $val";print'<input type="hidden" id="secret" value="'.  $val. '"  />';?><script> var getVal=document.getElementById('secret').value; document.write("<br />Value in Javascript: "+getVal);</script>

    thank a lot^^i got it
  2. If you're using an external Js file you could do something like this:
    <?header('Content-type: text/js');?>var abc = <?=abc?>

    If not, you can just echo the vars bitween you're Js code, like Html.

    if <OPTION value=$sFullname>($sFullname is php value)the result is "$sFullname "cannot read the the value~~how can i pass it in http option
×
×
  • Create New...