How to send registered data

Asked

Viewed 40 times

0

Someone could give me a light , I’m creating a bakery system and type in it has six computers and five stay in the box and one at the bottom of the bakery . These five computers have a screen as shown in the image below. what I want to do is when customers choose what they are going to buy I select on that screen and sent I want that on another screen a computer receives the request and see from which computer sent . How can I do ? inserir a descrição da imagem aqui

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 find easier for beginners), you have to know what folder permissions are. Download a class I created called Woop, and leave it in the same folder as the project used: https://github.com/paulosergioduff/woop

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

something like that:

Cadastra.php

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

recipient.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();

?>
  • Thanks gave to have an idea

Browser other questions tagged

You are not signed in. Login or sign up in order to post.