PHP code example of jsnlib / hash

1. Go to this page and download the library: Download jsnlib/hash 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/ */

    

jsnlib / hash example snippets


session_start();
ib\Hash\Ajax;

session_start();
ib\Hash\Ajax;

$array = $ajax->check($_POST['hash']);

//使用json回傳
echo json_encode($array);

session_start();
ib\Hash\Form;

session_start();
ib\Hash\Form;

/* 1. 使用循環 */
// if ($form->check(true) !== true) die("程序已執行完畢,請返回前一頁重新操作");

/* 2. 不使用循環 */
if ($form->check() !== true) die("程序已執行完畢,請返回前一頁重新操作");

echo "success";
`html
<form method="post" action="Server.php">
    <input type="hidden" name="<?=$form->put('name')