Jump to content

vagzaf

New Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by vagzaf

  1. I have a general question regarding this function and regarding php general

    If i understand well, sqlsrv_connect() is a php function? The dll is the driver that perform a connection to an SQL server, when the specific function is called. Why when i type this function in a php editor, the php doesn't recognize it as a function? Logically php must understand this function and when i run the script, if  the driver is not installed and is not placed in the correct folder, in runtime to get an error.

    Thank you

  2. Hello all,

    I am using php 8.0.8 and when i use the sqlsrv_connect(  $serverName, $connectionInfo ) function i get "undefined function". I use as an editor the Visual Studio Code.

    I have modified the php.ini with extension= D:\PROGRAMS\XAMPP\htdocs\php_sqlsrv_80_ts_x64.dll ( i thing this is the mssql server driver)

    Any help?

  3. Thanks you for your answer

    When i place the session_start() at the begining of the script, then the following error occurred ( Notice: session_start(): Ignoring session_start() because a session is already active in Pel_Rv.php on line 5 ), but the code runs correctly. My code is

    <? php

     $seqno_pel='';   

        session_start();

        error_reporting(E_ALL);

        ini_set('display_errors', '1');

  4. Hello,

    I have developed a page selecting and displaying data from a DataBase(mysql), as following

    $result = mysqli_query($conn, $sql);

    $fetch = mysqli_fetch_row($result);  

    $row_code = $fetch[0];

    session_start();

    $_SESSION['pel_seqno'] = $row_code; 

    The above page has tabs. In the second tab i access the $_SESSION['pel_seqno'] as following

    <?php

        $seqno_pel='';

        $seqno_pel = $_SESSION['pel_seqno']; 

    I use $seqno_pel variable to retrieve some other data from another table in the DataBase. So far so good, Inside the tab i have a button redirecting in another page and i want to use the value of $_SESSION['pel_seqno']; and i can not.

    The code which i am trying to access again the $_SESSION['pel_seqno'];  is the following

    <?php    

        $seqno_pel = $_SESSION['pel_seqno'];  

    When the button is pressed i get the following error message

    Warning: Undefined variable $_SESSION in D:\PROGRAMS\XAMPP\htdocs\CARDIO\Pel_Rv.php on line 5
    Warning: Trying to access array offset on value of type null in D:\PROGRAMS\XAMPP\htdocs\CARDIO\Pel_Rv.php on line 5

    Is it possible someone to help me with this.

    Thank you in advance

     

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