I have a problem : I want to store variable in every pages of my project, but each time I click on a link in my page, the folder is cleaning.
I also try with session variable but it's the same.
My code first page:
<form action"test.php" method="post">
clé ak : <input type="text" name="ak" /><br><br>
clé as : <input type="text" name ="as" />
<input type="submit" value="submit">
<a href="get-key3.php" target="_blank">take token</a>';
$ovh = new OvhApi();
$resp = array();
echo '<a href="test.php?action=1">info</a><br>
$resp = $ovh->get('/me');
$resp = $ovh->get('/domain');
As a beginner I'm not sure if this will be usefull to you, but I have been playing with text-files as well.
$myfile = fopen("cles.txt", "a+") or die("Unable to open file!"); $ak = $_POST['ak']."\r\n"; fwrite($myfile, $ak); $as = $_POST['as']."\r\n"; fwrite($myfile, $as); fclose($myfile);
"a+" here stands for: Open for reading and writing; If the file does not exist, attempt to create it. Writes are always appended. There are other options with fopen(); function.
The source I used was: http://php.net/manual/en/function.fopen.php