Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gaetan Carabetta
projet_nf17_p19_tdg1_groupe2
Commits
3b7c527d
Commit
3b7c527d
authored
Jun 22, 2019
by
Osvaldo Valdivia Salas
Browse files
Upload New File
parent
467f7be8
Changes
1
Hide whitespace changes
Inline
Side-by-side
application/addTraitement.php
0 → 100644
View file @
3b7c527d
<html>
<head>
<title>
Clinique Vétérinaire
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
>
</head>
<body>
<h1>
Ajout d'un Traitement
</h1>
<?php
// Connexion à la base de données
include
(
"connexion.php"
);
$vConn
=
new
PDO
(
"pgsql:host=
$vHost
;port=
$vPort
;dbname=
$vData
"
,
$vUser
,
$vPass
);
?>
<div>
<form
action=
"addTraitement.php"
method=
"post"
>
<p>
Animal:
<select
name=
"animal"
required
/>
<?php
$vSql
=
'select idAnimal from Animal;'
;
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_BOTH
))
{
echo
"<option>
$vResult[0]
</option>"
;
}
?>
</select>
</p>
<p>
ID Vétérinaire:
<select
name=
"veterinaire"
required
/>
<?php
$vSql
=
'select idVeterinaire from Veterinaire;'
;
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_BOTH
))
{
echo
"<option>
$vResult[0]
</option>"
;
}
?>
</select>
</p>
<p>
Médicament:
<select
name=
"medicament"
required
/>
<?php
$vSql
=
'select nomMolec from Medicament;'
;
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_BOTH
))
{
echo
"<option>
$vResult[0]
</option>"
;
}
?>
</select>
</p>
<p>
Date de debut:
<input
type=
"date"
name=
"ddebut"
required
/></p>
<p>
Durée:
<input
type=
"number"
name=
"duree"
required
/></p>
<p>
Quantité par jour:
<input
type=
"number"
name=
"qteJour"
required
/></p>
<p><input
type=
"submit"
value=
"OK"
></p>
</form>
</div>
</body>
</html>
Write
Preview
Supports
Markdown
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