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
c2355b21
Commit
c2355b21
authored
Jun 19, 2019
by
Oswaldo Aldair Alanis Mayorga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace insertClient.php
parent
debf0f6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
53 deletions
+47
-53
application/insertClient.php
application/insertClient.php
+47
-53
No files found.
application/insertClient.php
View file @
c2355b21
<?php
<!DOCTYPE html>
// 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>
<html>
<head>
<head>
<title>
Insert Client
</title>
</head>
<meta
charset=
"utf-8"
>
<title>
Insert Client
</title>
</head>
<body>
<body>
<table
border =
"1"
>
<table
border =
"1"
>
<tr>
<th>
id
</th>
<th>
Nom
</th>
<th>
Prenom
</th>
<th>
Date
</th>
<th>
Adresse
</th>
<th>
Numero
</th>
</tr>
<tr>
<th>
id
</th>
<th>
nom
</th>
<th>
prenom
</th>
<th>
ddn
</th>
<th>
adresse
</th>
<th>
numero
</th>
</tr>
<?php
$vHost
=
'tuxa.sme.utc'
;
$vPort
=
'5432'
;
$vData
=
'dbbdd0p020'
;
$vUser
=
'bdd0p020'
;
$vPass
=
'uLd6pAgM'
;
$nom
=
$_POST
(
'nom'
);
$prenom
=
$_POST
(
'prenom'
);
$ddn
=
$_POST
(
'ddn'
);
$add
=
$_POST
(
'add'
);
$ntel
=
$_POST
(
'ntel'
);
$vConn
=
new
PDO
(
"pgsql:host=
$vHost
;port=
$vPort
;dbname=
$vData
"
,
$vUser
,
$vPass
);
$vSql
=
'INSERT INTO client (nom, prenom, ddn, adresse, numeero) VALUES('
$nom
', '
$prenom
', '
$ddn
', '
$add
', '
$ntel
')'
;
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
$vSql
=
'SELECT * FROM client'
;
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_ASSOC
))
{
echo
'<tr>'
;
echo
"<td>
$vResult[idClient]
</td>"
;
echo
"<td>
$vResult[nom]
</td>"
;
echo
"<td>
$vResult[prenom]
</td>"
;
echo
"<td>
$vResult[ddn]
</td>"
;
echo
"<td>
$vResult[adresse]
</td>"
;
echo
"<td>
$vResult[numero]
</td>"
;
echo
'</tr>'
;
}
*/
?>
</table>
</table>
</body>
</html>
\ No newline at end of file
</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