I wanted to do more or less like Youtube, where you fill out the form and then a page with your video is created (my site will also contain videos), I already did the part of the upload but I have no idea where start to generate a page automatically. Could you tell me a programming language for this or if I can do it for php itself?
Upload:
<?php
include("conexao.php");
$msg = false;
if(isset($_FILES['arquivo'])){
$extensao = strtolower(substr($_FILES['arquivo']['name'], -4));
$novo_nome = md5(time()) .$extensao;
$diretorio = "upload/";
move_uploaded_file($_FILES['arquivo']['tmp_name'], $diretorio.$novo_nome);
$sql_code = "INSERT INTO arquivo (codigo, arquivo, data) VALUES (null, '$novo_nome', NOW())";
if ($mysqli->query($sql_code))
$msg = "Arquivo enviado";
else
$msg = "Falha ao enviar.";
}
?>
<?php
if ($msg != false) echo "<p> $msg </p>";
?>
<form action="upload.php" method="POST" enctype="multipart/form-data">
Arquivo: <input type="file" required name="arquivo">
<input type="submit" name="Salvar">
</form>