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
c430eb88
Commit
c430eb88
authored
Aug 07, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base de datos
parent
7afc8eba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
8 deletions
+34
-8
index.php
index.php
+28
-7
lenguaje.php
lenguaje.php
+6
-1
No files found.
index.php
View file @
c430eb88
...
...
@@ -85,31 +85,44 @@ $conn->close();*/
<datalist
id=
"Escuelas"
>
<?php
while
(
$row
=
$result1
->
fetch_assoc
())
{
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'</option>'
;
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'
<br>de '
.
utf8_encode
(
$row
[
"C_NOM_LOC"
])
.
'
</option>'
;
//echo '<option value="'.utf8_encode($row["NOMBRECT"]).'">de '.utf8_encode($row["C_NOM_LOC"]).' <br>clave: '.utf8_encode($row["CV_CCT"]).'</option>';
}
while
(
$row
=
$result2
->
fetch_assoc
())
{
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'</option>'
;
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'
<br>de '
.
utf8_encode
(
$row
[
"C_NOM_LOC"
])
.
'
</option>'
;
}
while
(
$row
=
$result3
->
fetch_assoc
())
{
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'</option>'
;
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'
<br>de '
.
utf8_encode
(
$row
[
"C_NOM_LOC"
])
.
'
</option>'
;
}
while
(
$row
=
$result4
->
fetch_assoc
())
{
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'</option>'
;
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'
<br>de '
.
utf8_encode
(
$row
[
"C_NOM_LOC"
])
.
'
</option>'
;
}
while
(
$row
=
$result5
->
fetch_assoc
())
{
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
'</option>'
;
//
echo '<option value="'.utf8_encode($row["CV_CCT"]).'">'.utf8_encode($row["NOMBRECT"]).' <br>de '.utf8_encode($row["C_NOM_LOC"]).'</option>';
//
echo '<option value="'.utf8_encode($row["CV_CCT"]).'">'.utf8_encode($row["NOMBRECT"]).'</option>';
echo
'<option value="'
.
utf8_encode
(
$row
[
"CV_CCT"
])
.
'">'
.
utf8_encode
(
$row
[
"NOMBRECT"
])
.
' <br>de '
.
utf8_encode
(
$row
[
"C_NOM_LOC"
])
.
'</option>'
;
}
?>
</datalist>
<div
class=
"mt-4"
>
<div
class=
"d-flex text-center justify-content-center links"
id=
"titulo1"
>
</div>
</div>
<div
class=
"mt-4"
>
<div
class=
"d-flex text-center justify-content-center links"
>
<h1
id=
"nombre_escuela"
></h1>
</div>
</div>
<div
class=
"mt-4"
>
<div
class=
"d-flex text-center justify-content-center links"
id=
"titulo2"
>
</div>
</div>
<div
class=
"mt-4"
>
<div
class=
"d-flex text-center justify-content-center links"
>
<h3
id=
"clave"
></h3>
</div>
</div>
...
...
@@ -135,7 +148,15 @@ $conn->close();*/
var
lastword
=
valor
.
split
(
" "
).
pop
();
document
.
getElementById
(
'input_escuela'
).
value
=
valor
;
$
(
'#nombre_escuela'
).
empty
();
$
(
'#nombre_escuela'
).
append
(
valor
);
$
(
'#clave'
).
empty
();
$
(
'#titulo1'
).
empty
();
$
(
'#titulo2'
).
empty
();
var
porciones
=
valor
.
split
(
'de '
);
$
(
'#nombre_escuela'
).
append
(
porciones
[
0
]);
$
(
'#titulo1'
).
append
(
'<h1>Escuela: </h1>'
);
$
(
'#titulo2'
).
append
(
'<h3>Localidad:</h3>'
);
$
(
'#clave'
).
append
(
porciones
[
1
]);
$
.
post
(
"ajax_post.php"
,
{
...
...
lenguaje.php
View file @
c430eb88
...
...
@@ -5,8 +5,13 @@
<?php
session_start
();
if
(
isset
(
$_POST
[
'escuela'
]))
{
$_SESSION
[
"escuela"
]
=
$_POST
[
'escuela'
];
$arr
=
explode
(
"de "
,
$_POST
[
'escuela'
]);
$_SESSION
[
"escuela"
]
=
$arr
[
0
];
$_SESSION
[
"localidad"
]
=
$arr
[
1
];
$_SESSION
[
"clave_escuela"
]
=
$_POST
[
'clave_escuela'
];
// $porciones = explode("de ", $_POST['escuela']);
// var_dump($porciones);
}
?>
<!DOCTYPE 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