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
415a6f52
Commit
415a6f52
authored
Jun 17, 2019
by
Oswaldo Aldair Alanis Mayorga
Browse files
Add new file
parent
e47d430b
Changes
1
Show whitespace changes
Inline
Side-by-side
application/insertClient.php
0 → 100644
View file @
415a6f52
<?php
// Connexion à la base de données
$vNom
=
$_GET
[
'nom'
];
$vPrenom
=
$_GET
[
'Prenom'
];
$vddn
=
$_GET
[
'ddn'
];
$vadd
=
$_GET
[
'add'
];
$vTel
=
$_GET
[
'nTel'
];
$vHost
=
'tuxa.sme.utc'
;
$vPort
=
'5432'
;
$vData
=
'dbbdd0p020'
;
$vUser
=
'bdd0p020'
;
$vPass
=
'uLd6pAgM'
;
$vConn
=
new
PDO
(
"pgsql:host=
$vHost
;port=
$vPort
;dbname=
$vData
"
,
$vUser
,
$vPass
);
if
(
$vNom
)
{
if
(
$vPrenom
)
{
if
(
$vddn
)
{
if
(
$vTel
)
{
$query
=
"INSERT INTO client(nom, prenom, ddn, adresse, numero) VALUES('
$vNom
', '
$vPrenom
', '
$vddn
', '
$vadd
', '
$vTel
')"
;
$vSt
=
$vConn
->
prepare
(
$query
);
$vSt
->
execute
();
$query
=
"SELECT * FROM client"
;
$vSt
=
$vConn
->
prepare
(
$query
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_ASSOC
))
{
echo
'<tr>'
;
echo
"<td>
$vResult[__________]
</td>"
;
echo
"<td>
$vResult[__________]
</td>"
;
echo
"<td>
$vResult[__________]
</td>"
;
echo
'</tr>'
;
}
echo
"Insertion Correct"
;
}
}
}
}
?>
<html>
<head>
<title>
Insert Client
</title>
</head>
<body>
<table
border =
"1"
>
<tr>
<th>
id
</th>
<th>
Nom
</th>
<th>
Prenom
</th>
<th>
Date
</th>
<th>
Adresse
</th>
<th>
Numero
</th>
</tr>
</table>
</body>
</html>
\ 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