-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnew_member.php
35 lines (25 loc) · 978 Bytes
/
new_member.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once 'vendor/autoload.php';
use GraphAware\Neo4j\Client\ClientBuilder;
if ($_POST){
$client = ClientBuilder::create()
->addConnection('default', 'http://neo4j:neo4j@localhost:7474') // Example for HTTP connection configuration (port is optional)
->build();
$client->run('CREATE (n:Person) SET n += {infos}', ['infos' => ['name' => $_POST['name'], 'age' => $_POST['age'],
'gender' => $_POST['gender'], 'telephone' => $_POST['telephone']]]);
//$client->run('CREATE (n:Person) SET n += {infos}', ['infos' => $_POST]);
}
//$records = $result->getRecords();
//print_R($records);
?>
<form method="POST" action="new_member.php">
name: <input type="text" name="name">
<br>
telphone:<input type="text" name="telephone"><br>
gender:<input type="text" name="gender" placeholder="M/F"><br>
age:<input type="text" name="age"><br>
submit:<input type="submit">
</form>