Jump to content

NorKayak

New Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About NorKayak

  • Rank
    Newbie
  1. Yes: <?php ob_start(); session_start(); ?>
  2. Thanks I didn't think about that... I checked and the codes reads: var tempoVar = null; It seems then that the $_SESSION variable is not recognized in the function. Could that have something to do with declaring the variable global? So I tried this: <?php $theName = global $_SESSION['$Sess_Name']; ?> But the browser doesn't accept it...
  3. Ok, I tried. Still not working. The diference is before I had the output "NULL" and now nothing...
  4. Hi; I'm a beginner and I'm getting a big headache figuring how to convert php variables into Javascript variables. I want to use the content of $theName as the value for an input tag. $_SESSION['$Sess_Name'] is loaded with the right data, I verified it. But my function InitField returns always the word NULL. Why is that? Where is the problem? Thank Here is my code: function InitField() { <?php $theName = $_SESSION['$Sess_Name']; ?> var tempoVar = "<?php echo json_encode($theName); ?>"; var myInput = document.getElementById('theSurname'); myInput.value = tempoVar; }
×
×
  • 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.