Good morning, I am doing a virtual store with php without databases and I have a problem. As you can see I have a table with the products. Since there is no database, I have to store this data in a file as an array and I do not know how to do it. I attach code. I also use sessions in this case I'm in session and I mean that aspect does not matter. Thanks
<?php session_start(); ?>
<HTML>
<HEAD>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
<style type="text/css">
</style>
<TITLE>Accés a la sessió com a javi</TITLE>
</HEAD>
<BODY>
<?php
//session_start();
$valor = $_SESSION['acces'];
if ($_SESSION['acces']!="2"){
//echo "No s'ha iniciat correctament aquesta sessió";
echo "No heu accedit correctament";
print '<META HTTP-EQUIV="refresh" CONTENT="2;URL=./index.html">';
}else{
//echo "Valor de la sessió : $valor<BR>\n";
//echo "Benvingut a la pàgina privada<BR><BR>\n";
//echo "<a href=surt.php>Surt de la sessió</a>\n";
?>
<h1 style="text-align:center">Tienda virtual de XiaomisiOsi</h1>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>Tienda virtual de XiaomiManda</title>
</head>
<body>
<br>
<form method='POST' action='r03c.php'>
<table border="1" align="center">
<tr align="center">
<td>Imagen del producto</td>
<td>Nombre</td>
<td>Precio</td>
<td>Unidades totales</td>
<td>Comprar unidad</td>
</tr>
<tr align="center">
<td><img src="imatges/xiaomi.jpg" width="300" style="300" alt=""></td>
<td>Xiaomi</td>
<td>100</td>
<td>10</td>
<td><input type="checkbox" name="mobil1" value="mobil1" />Si<br /></td>
<tr align="center">
<td><img src="imatges/xiaomimi8.jpg" width="300" style="300" alt=""></td>
<td>Xiaomimi8</td>
<td>200</td>
<td>10</td>
<td><input type="checkbox" name="mobil2" value="mobil2" />Si<br /></td>
</tr>
<tr align="center">
<td><img src="imatges/xiaomimix2.jpg" width="300" style="300" alt=""></td>
<td>Xiaomimix2</td>
<td>300</td>
<td>10</td>
<td><input type="checkbox" name="mobil3" value="mobil3" />Si<br /></td>
<tr>
</table>
<input style="margin-left:650px" type="submit" name="submit" value="Endavant" />
</form>
</body>
</html>
<a style="float:right" href="carrito.php" width="300" style="300" alt="">Acceso carrito</a>
<BR>
<BR>
<BR><a style="float:right" href=surt.php>Surt de la sessió</a>
<?php
}
?>
</BODY>
</HTML>