How to send registered data [closed]

0

Someone could give me a light, I'm creating a bakery system and it's kind of like six computers and fives are in the box and one in the back of the bakery. These five computers have a screen as shown in the image below. what I want to do is when the customers choose what they will buy I select on that screen and send it I want it on another screen that a computer receives the order and see which computer it sent. How can I do it ?

    
asked by anonymous 29.12.2016 / 15:12

1 answer

1

You have to have a very basic knowledge of PHP.

If you choose a database for this, you have to know a little bit about MySQL / php. If you choose file writing (which I think is easier for beginners), you have to know what folder permissions are. Download a class I created called Woop, and leave it in the same project folder as: link

How would I do it? If it is very simple, save the computer name in a REQUEST (temporary browser data).

something like this:

Cadastra.php

<form action="recebeformulario.php" method="POST">
<input type="text" name="nomeDoComputador"><br>
<text area name="pedido"><br>
<input type="submit" value="cadastrarComputador">

receiveform.php

<?php

$nomeDoComputador = $_GET['nomeDoComputador'];
$pedido = $_GET['pedido'];

include "criarpagina.class.php";
include "formulario.php";
$app = $_POST['funcao'];
    $criarpagina = new criarpagina; /* A função de usar classes e objetos ao invés de variáveis estruturais
    tem mais a ver com didática e organização do código*/
    $criarpagina->pagina = "pedidos" . ".txt"; // Sempre concatene para evitar acesso indevido a outros arquivos
    $criarpagina->conteudo = $nomeDoComputador . " " . $pedido . "
"
;//orinalmente base64_encode($_POST['conteudo']);
    //$criarpagina->arquivoalvo = ';
    $criarpagina->$app();
    //$criarpagina->imprimeXML();

?>
    
29.12.2016 / 15:34