Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet_nf17_p19_tdg1_groupe2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gaetan Carabetta
projet_nf17_p19_tdg1_groupe2
Commits
40f9781f
Commit
40f9781f
authored
Jun 19, 2019
by
Osvaldo Valdivia Salas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete animal.php
parent
eab76cc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
83 deletions
+0
-83
application/animal.php
application/animal.php
+0
-83
No files found.
application/animal.php
deleted
100644 → 0
View file @
eab76cc9
<html>
<head>
<title>
Exercice
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
>
</head>
<body>
<h1>
Information des animaux
</h1>
<table
border=
"1"
>
<tr>
<th>
idAnimal
</th>
<th>
Nom
</th>
<th>
Poids
</th>
<th>
Taille
</th>
<th>
Naissance
</th>
<th>
idClient
</th>
<th>
Espece
</th>
<th>
Supprimer
</th>
</tr>
<?php
// Connexion à la base de données
$vHost
=
'tuxa.sme.utc'
;
$vPort
=
'5432'
;
$vData
=
'dbbdd0p117'
;
$vUser
=
'bdd0p117'
;
$vPass
=
'LpIHl1sZ'
;
$vConn
=
new
PDO
(
"pgsql:host=
$vHost
;port=
$vPort
;dbname=
$vData
"
,
$vUser
,
$vPass
);
// Affichage du tableau de données
$vSql
=
'select * from Animal;'
;
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_BOTH
))
{
echo
'<tr>'
;
echo
"<td>
$vResult[0]
</td>"
;
echo
"<td>
$vResult[1]
</td>"
;
echo
"<td>
$vResult[2]
</td>"
;
echo
"<td>
$vResult[3]
</td>"
;
echo
"<td>
$vResult[4]
</td>"
;
echo
"<td>
$vResult[5]
</td>"
;
echo
"<td>
$vResult[6]
</td>"
;
echo
"<td><form action='remAnimal.php' method='post'> <input type='text' name='idAnimal' value=
$vResult[0]
hidden/> <input id='btnRemove' type='submit' value='X'> </form></td>"
;
echo
'</tr>'
;
}
?>
</table>
<div>
<form
action=
"addAnimal.php"
method=
"post"
>
<p>
Nom de l'animal:
<input
type=
"text"
name=
"nom"
required
/></p>
<p>
Poids:
<input
type=
"text"
name=
"poids"
required
/></p>
<p>
Taille:
<input
type=
"text"
name=
"taille"
required
/></p>
<p>
Date de naissance:
<input
type=
"date"
name=
"ddn"
required
/></p>
<p>
Client:
<select
name=
"client"
required
/>
<?php
$vSql
=
'select idClient from Client;'
;
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_BOTH
))
{
echo
"<option>
$vResult[0]
</option>"
;
}
?>
</select>
</p>
<p>
Espece:
<select
name=
"espece"
required
/>
<?php
$vSql
=
'select nomEspece from Espece;'
;
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_BOTH
))
{
echo
"<option>
$vResult[0]
</option>"
;
}
?>
</select>
</p>
<p><input
type=
"submit"
value=
"OK"
></p>
</form>
</div>
</body>
</html>
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