Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Formulario de paz
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
Ulises Morales Ramírez
Formulario de paz
Commits
25741ea1
Commit
25741ea1
authored
Aug 09, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modificaciones:
responsivo no permita ingresar escuelas inexistentes
parent
f082f67b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
Escuelas.sql
Escuelas.sql
+5
-2
index.php
index.php
+1
-1
insertar.php
insertar.php
+1
-1
No files found.
Escuelas.sql
View file @
25741ea1
...
...
@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 0
8-08-2019 a las 16:17:14
-- Tiempo de generación: 0
9-08-2019 a las 14:05:58
-- Versión del servidor: 5.7.27-0ubuntu0.18.04.1
-- Versión de PHP: 7.2.19-0ubuntu0.18.04.1
...
...
@@ -3450,7 +3450,10 @@ CREATE TABLE `respuesta` (
`idioma`
varchar
(
10
)
COLLATE
utf8_unicode_ci
NOT
NULL
,
`nombre`
varchar
(
250
)
COLLATE
utf8_unicode_ci
NOT
NULL
,
`edad`
int
(
2
)
NOT
NULL
,
`comentario`
varchar
(
250
)
COLLATE
utf8_unicode_ci
NOT
NULL
`comentario`
varchar
(
250
)
COLLATE
utf8_unicode_ci
NOT
NULL
,
`fecha`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
`REMOTE_ADDR`
varchar
(
300
)
COLLATE
utf8_unicode_ci
NOT
NULL
,
`HTTP_USER_AGENT`
varchar
(
300
)
COLLATE
utf8_unicode_ci
NOT
NULL
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
;
-- --------------------------------------------------------
...
...
index.php
View file @
25741ea1
insertar.php
View file @
25741ea1
...
...
@@ -13,7 +13,7 @@ echo $_POST['edad'];
echo
$_POST
[
'comentario'
];
//$sql = "INSERT INTO `respuesta`(`id_respuesta`, `clave_escuela`, `idioma`, `nombre`, `edad`, `comentario`) VALUES (null ,".$_SESSION['clave_escuela'].",,,,)";
$sql
=
"INSERT INTO `respuesta`(`id_respuesta`, `clave_escuela`, `idioma`, `nombre`, `edad`, `comentario`
) VALUES (null ,'"
.
$_SESSION
[
'clave_escuela'
]
.
"','"
.
$_POST
[
'idioma'
]
.
"','"
.
$_POST
[
'nombre'
]
.
"',"
.
$_POST
[
'edad'
]
.
",'"
.
$_POST
[
'comentario
'
]
.
"')"
;
$sql
=
"INSERT INTO `respuesta`(`id_respuesta`, `clave_escuela`, `idioma`, `nombre`, `edad`, `comentario`
, `fecha`, `REMOTE_ADDR`, `HTTP_USER_AGENT`) VALUES (null ,'"
.
$_SESSION
[
'clave_escuela'
]
.
"','"
.
$_POST
[
'idioma'
]
.
"','"
.
$_POST
[
'nombre'
]
.
"',"
.
$_POST
[
'edad'
]
.
",'"
.
$_POST
[
'comentario'
]
.
"', CURRENT_TIMESTAMP,'"
.
$_SERVER
[
'REMOTE_ADDR'
]
.
"','"
.
$_SERVER
[
'HTTP_USER_AGENT
'
]
.
"')"
;
if
(
$conn
->
query
(
$sql
)
===
TRUE
)
{
echo
"New record created successfully"
;
...
...
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