Global variable

Hi.
I have this code:

<?php
global $fecha_trabajo;
$fecha_trabajo = $_POST['fecha']; <— receive value from form
$tpl = new Plantilla();
$tpl->display('plantilla.tpl.php');
?>
PHP:

In plantilla.tpl.php

<!DOCTYPE html>
<html lang="es">
<body>
<form name="view" action="process.php" method="POST" enctype="multipart/form-data">
(…..)
</form>
</body>
</html> […]

See original post by invalid@example.com (piropeator)

Leave a Reply