mirror of
https://github.com/Floriansylvain/projet_programmation_web.git
synced 2026-08-19 19:53:18 +02:00
🎨 POST -> GET for research form
This commit is contained in:
@@ -12,11 +12,11 @@
|
|||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
include("navbar.php");
|
include("navbar.php");
|
||||||
if (isset($_POST['author'])) {
|
if (isset($_GET['author'])) {
|
||||||
if (strlen($_POST['author']) < 3) {
|
if (strlen($_GET['author']) < 3) {
|
||||||
echo "<p class='error'>Veuillez entrer 3 caractères minimum.</p>";
|
echo "<p class='error'>Veuillez entrer 3 caractères minimum.</p>";
|
||||||
} else {
|
} else {
|
||||||
echo "<script>requestToApi('" . $_POST['author'] . "')</script>";
|
echo "<script>requestToApi('" . $_GET['author'] . "')</script>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
<h1>theses.fr</h1>
|
<h1>theses.fr</h1>
|
||||||
<form action="index.php" method="POST" class="navbar-input">
|
<form action="index.php" method="GET" class="navbar-input">
|
||||||
<input type="text" name="author" placeholder="nom auteur">
|
<input type="text" name="author" placeholder="nom auteur">
|
||||||
<button>
|
<button>
|
||||||
<img src="assets/search.svg" alt="search">
|
<img src="assets/search.svg" alt="search">
|
||||||
|
|||||||
Reference in New Issue
Block a user