Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Projet_idaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Liang Wu
Projet_idaw
Commits
4f4db46f
Commit
4f4db46f
authored
Apr 01, 2020
by
Raulin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maj ajout aliment
parent
c479113a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
aliments.php
aliments.php
+1
-1
ajouter_aliment.php
api/ajouter_aliment.php
+2
-2
No files found.
aliments.php
View file @
4f4db46f
...
@@ -382,7 +382,7 @@
...
@@ -382,7 +382,7 @@
<input
type=
"text"
id=
"aliment"
name=
"aliment"
required
>
<input
type=
"text"
id=
"aliment"
name=
"aliment"
required
>
</div>
</div>
<div>
<div>
<label>
Type d'aliment
:
</label>
<label>
Type d'aliment
</label>
<input
type=
"text"
id=
"cat"
name=
"cat"
required
>
<input
type=
"text"
id=
"cat"
name=
"cat"
required
>
<!-- <select id="type" size="1">
<!-- <select id="type" size="1">
<option value="fruit"> Fruit </option>
<option value="fruit"> Fruit </option>
...
...
api/ajouter_aliment.php
View file @
4f4db46f
<?php
<?php
require_once
(
"template.php"
);
if
(
isset
(
$_POST
[
"aliment"
])
&&
isset
(
$_POST
[
"cat"
])){
if
(
isset
(
$_POST
[
"aliment"
])
&&
isset
(
$_POST
[
"cat"
])){
$requete
=
"INSERT INTO `ALIMENTS` (`ID_ALIMENT`,`NAME_ALIMENT`, `TYPE_ALIMENT`) VALUES (NULL, '"
.
$_POST
[
'aliment'
]
.
"', '"
.
$_POST
[
'cat'
]
.
"')"
;
$requete
=
"INSERT INTO `ALIMENTS` (`ID_ALIMENT`,`NAME_ALIMENT`, `TYPE_ALIMENT`) VALUES (NULL, '"
.
$_POST
[
'aliment'
]
.
"', '"
.
$_POST
[
'cat'
]
.
"')"
;
...
@@ -8,5 +9,4 @@ if(isset($_POST["aliment"]) && isset($_POST["cat"])){
...
@@ -8,5 +9,4 @@ if(isset($_POST["aliment"]) && isset($_POST["cat"])){
$msg
=
"Il manque des informations"
;
$msg
=
"Il manque des informations"
;
}
}
echo
json_encode
(
$msg
);
echo
$msg
;
header
(
"Location: aliment.php"
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment