PHP code example of nehalvpatel / synapse

1. Go to this page and download the library: Download nehalvpatel/synapse library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nehalvpatel / synapse example snippets


   	
  $Synapse = new \Synapse\Handler(new PDO("mysql:host=" . $db_host . ";dbname=" . $db_name, $db_username, $db_password));
  session_set_save_handler($Synapse, true);
  session_start();
  
  $_SESSION["user_id"] = "1";