acho que nao fui muito clara.
vou postar os codigos para ver se fica mais facil de entender o que estou tentando fazer!!!
gostaria de armazenar os periodos selecionados no html na sua respectiva coluna no banco de dados.
mas nao sei o que esta acontecendo pois quando seleciono mais de um periodo ele nao guarda essa segunda escolha, so armazena a primeira escolha.
isso ocorre com as disciplinas tambem!!!
se puder me ajudar agradeco muito!!!
caso contrario vou deixar kieto, pois nao vou ter muito tempo para mexer com isso, pq tenho que entregar o tcc semana que vem!!! aiaiai
cursos.html
<html>
<head>
<meta http-equiv="Content-Language" content="pt-br">
<title>Integração Universidade / Empresa - Cadastro de Curso</title>
</head>
<body bgcolor="#CBD7DC" vlink="#FFFFFF" link="#FFFFFF" alink="#FFFFFF">
<div align="center">
<table width="755" cellpadding="0" cellspacing="0">
<tr>
<td> <img src="imagens/banner.jpg" width="755" height="97"></td>
</tr>
</table>
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" height="1">
<tr>
<td align="left" style="text-indent: 0; margin-left: 0" height="1">
<p align="center"><a href="login_universitario.html">
<img src="imagens/btuniversitarios.jpg" width="161" height="124"></a></td>
<td align="left" style="text-indent: 0; margin-left: 0" height="1">
<p align="center">
<a href="login_empresa.html"><img src="imagens/btempresas.jpg" width="161" height="124"></a>
</td>
<td align="left" style="text-indent: 0; margin-left: 0" height="1">
<p align="center"><a href="login_instituicao.html"><img src="imagens/btinstituicoes.jpg" width="161" height="124"></a></td>
<td align="left" style="text-indent: 0; margin-left: 0" height="1">
<img src="imagens/btcontato.jpg" width="161" height="124" align="right"></td>
</tr>
<tr>
<td height="17" width="3544" colspan="4">
</td>
</tr>
<tr>
<td height="17" width="3544" colspan="4">
<img src="imagens/azul.jpg" width="755" height="17"></td>
</tr>
</table>
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" height="130" style="border-collapse: collapse">
<TR>
<TD width="1" height="122">
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" height="130" style="border-collapse: collapse">
<TR>
<TD width="1" height="122">
<a href="principal.html">
<img src="imagens/home_link.jpg" width="190" height="39"></a><table width="193" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" height="194" style="border-collapse: collapse">
<TR>
<TD width="1" height="16">
<img src="imagens/azul.jpg" width="192" height="17"></TD>
</TR>
<tr>
<td height="1" width="1">
<a href="link.html">
<img src="imagens/link_link.jpg" width="190" height="39"></a></td>
</tr>
<tr>
<td height="41" width="1">
<img src="imagens/azul.jpg" width="192" height="17"><a href="parceiros.html"><img src="imagens/parceiros_link.jpg" width="190" height="39"></a></td>
</tr>
<tr>
<td height="15" width="1">
<img src="imagens/azul.jpg" width="192" height="17"></td>
</tr>
<tr>
<td height="15" width="1">
<a href="downloads.html">
<img src="imagens/dowloads_link.jpg" width="190" height="39"></a></td>
</tr>
<tr>
<td height="18" width="1">
<img src="imagens/azul.jpg" width="192" height="17"></td>
</tr>
</table>
</TD>
</TD>
<TD width="551" height="122">
<table width="443" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" style="border-collapse: collapse" height="207">
<tr>
<td align="center" style="text-indent: 0; margin-left: 0" colspan="3" width="443" height="16">
<p style="margin-left: 10" align="left">
<font size="2" color="#003366" face="Verdana">Cadastro</font><font size="2" color="#003366" face="Verdana">
Curso</font></p>
</td>
</tr>
<tr>
<font size="1" face="Times New Roman" color="#003366">
<td height="16" width="443" colspan="3" align="center">
<p style="margin-left: 10" align="right"></td>
</font>
</tr>
<tr>
<td align="center" style="text-indent: 0; margin-left: 0" colspan="3" width="443" height="17">
<p style="margin-left: 10" align="left">
<font face="Verdana" size="2" color="#003366">Informações </font></p>
</td>
</tr>
<tr>
<font size="1" face="Times New Roman" color="#003366">
<td height="16" width="443" colspan="3">
<p style="margin-left: 10" align="right"></td>
</font>
</tr>
<tr>
<td width="1" align="right" height="22">
<p style="margin-left:10" align="right">
<font size="2" color="#FF0000" face="Verdana">*</font><font face="Verdana" size="2" color="#003366">Curso:</font></td>
<td width="680" colspan="2" align="right" height="22">
<p style="margin-left: 10" align="left">
<select name="curso">
<option>Selecione</option>
<option value="administracao">Adiministração</option>
<option value="ciencia_computacao">Ciência da Computação</option>
<option value="direito">Direito</option>
<option value="filosofia">Filosofia</option>
<option value="geografia">Geografia</option>
<option value="historia">História</option>
<option value="matemática">Matemática</option>
<option value="pedagogia">Pedagogia</option>
<option value="psicologia">Psicologia</option>
<option value="turismo">Turismo</option>
</select></td>
</tr>
<tr>
<td height="19" width="443" colspan="3" align="right">
<p style="margin-left: 10" align="right"> </td>
</tr>
<tr>
<td height="44" width="1" align="right">
<p style="margin-left: 10" align="right">
<font size="2" color="#FF0000" face="Verdana">*</font><font face="Verdana" size="2" color="#003366">Período:</font></td>
<td colspan="2" align="right" height="44">
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" --><p style="margin-left: 10" align="left">
<font face="Verdana" color="#003366" size="2">
<input type="checkbox" name="periodo" value="matutino">Matutino
<input type="checkbox" name="periodo" value="vespertino">Vespertino</font></p>
</form>
<p align="left" style="margin-left: 10">
<font face="Verdana" color="#003366" size="2">
<input type="checkbox" name="periodo" value="noturno">Noturno
<input type="checkbox" name="periodo" value="integral">Integral</font></td>
</tr>
<tr>
<td height="19" width="443" colspan="3" align="right">
<p style="margin-left: 10" align="right"> </td>
</tr>
<tr>
<td height="22" width="132" colspan="2" align="right">
<p align="left">
<font size="2" color="#FF0000" face="Verdana"> *</font><font face="Verdana" size="2" color="#003366">Nota
Mec:</font></td>
<td height="22" width="311" align="right">
<p style="margin-left: 10" align="right">
<font face="Verdana" size="2" color="#003366">
<input name="senha" class="unnamed1" size="17" style="float: left"></font></td>
</tr>
<tr>
<font size="1" face="Times New Roman" color="#003366">
<td height="16" width="443" colspan="3" align="right">
</td>
</font>
</tr>
</table>
</TD>
</TR>
<TR>
<TD width="1" height="122">
</TD>
<TD width="551" height="122">
<table width="452" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
<tr>
<td align="center" width="445">
<font face="Verdana" size="1" color="#003366">
<img border="0" src="imagens/azul.jpg" width="445" height="9"></font></td>
</tr>
<tr>
<td align="center" width="445">
</td>
</tr>
<tr>
<td align="center" width="445">
<p align="left"><font face="Verdana" size="2" color="#003366">Grade
Curricular</font></td>
</tr>
<tr>
<td align="center" width="445">
</td>
</tr>
<tr>
<td align="center" width="445">
<p align="left" style="margin-left: 10">
<font color="#003366" face="Verdana" size="2">Disciplina(s):</font>
<select size="1" name="ano_disciplina">
<option value="1_ano">1º Ano</option>
<option value="2_ano">2º Ano</option>
<option value="3_ano">3º Ano</option>
<option value="4_ano">4º Ano</option>
<option value="5_ano">5º Ano</option>
</select> <font face="Verdana" color="#003366"><b>
<select name="semestre_disciplina"> <option>Selecione</option>
<option value="1_semestre">1 Semestre</option> <option value="2_semestre">
2 Semestre</option>
<option value="3_semestre">3 Semestre</option> <option value="4_semestre">
4 Semestre</option>
<option value="5_semestre">5 Semestre</option> <option value="6_semestre">
6 Semestre</option>
<option value="7_semestre">7 Semestre</option> <option value="8_semestre">
8 Semestre</option>
<option value="9_semestre">9 Semestre</option> <option value="10_semestre">
10 Semestre</option>
</select></b></font></td>
</tr>
</table>
<table width="452" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
<tr>
<td height="16" width="898" colspan="2">
</td>
</tr>
<tr>
<td height="16" width="335">
<p style="margin-left: 10"><font face="Verdana" size="2" color="#003366">
Disciplina 1:</font></td>
<td height="16" width="563">
<p align="left">
<font size="2" color="#003366" face="Verdana">
<input type="text" name="disciplinas" size="47" maxlenght="25"></font></td>
</tr>
<tr>
<td height="16" width="335">
</td>
<td height="16" width="563">
</td>
</tr>
<tr>
<td height="16" width="335">
<p style="margin-left: 10"><font face="Verdana" size="2" color="#003366">
Disciplina 2:</font></td>
<td height="16" width="563">
<p align="left">
<font size="2" color="#003366" face="Verdana">
<input type="text" name="disciplinas" size="47" maxlenght="25"></font></td>
</tr>
<tr>
<td height="16" width="898" colspan="2">
</td>
</tr>
<tr>
<td height="16" width="335">
<p style="margin-left: 10"><font face="Verdana" size="2" color="#003366">
Disciplina 3:</font></td>
<td height="16" width="563">
<p align="left">
<font size="2" color="#003366" face="Verdana">
<input type="text" name="disciplinas" size="47" maxlenght="25"></font></td>
</tr>
<tr>
<td height="16" width="898" colspan="2">
</td>
</tr>
<tr>
<td height="16" width="335">
<p style="margin-left: 10"><font face="Verdana" size="2" color="#003366">
Disciplina 4:</font></td>
<td height="16" width="563">
<p align="left">
<font size="2" color="#003366" face="Verdana">
<input type="text" name="disciplinas" size="47" maxlenght="25"></font></td>
</tr>
<tr>
<td height="16" width="449">
</td>
<td height="16" width="449">
</td>
</tr>
<tr>
<td height="16" width="335">
<p style="margin-left: 10"><font face="Verdana" size="2" color="#003366">
Disciplina 5:</font></td>
<td height="16" width="563">
<p align="left">
<font size="2" color="#003366" face="Verdana">
<input type="text" name="disciplinas" size="47" maxlenght="25"></font></td>
</tr>
<tr>
<td height="16" width="449">
</td>
<td height="16" width="449">
</td>
</tr>
<tr>
<td height="16" width="335">
<p style="margin-left: 10"><font face="Verdana" size="2" color="#003366">
Disciplina 6:</font></td>
<td height="16" width="563">
<p align="left">
<font size="2" color="#003366" face="Verdana">
<input type="text" name="disciplinas" size="47" maxlenght="25"></font></td>
</tr>
<tr>
<td height="16" width="449">
</td>
<td height="16" width="449">
</td>
</tr>
<tr>
<td height="16" width="335">
<p style="margin-left: 10"><font face="Verdana" size="2" color="#003366">
Disciplina 7:</font></td>
<td height="16" width="563">
<p align="left">
<font size="2" color="#003366" face="Verdana">
<input type="text" name="disciplinas" size="47" maxlenght="25"></font></td>
</tr>
<tr>
<td height="16" width="898" colspan="2">
<p style="margin-left: 10" align="left"></td>
</tr>
<tr>
<td align="left" width="895" colspan="2">
<p style="margin-left: 10" align="left">
<font face="Verdana" size="2" color="#003366">Quantidade(s) Aluno(s):
<input type="text" name="quantidade_aluno" size="15" maxlenght="20"></font></td>
</tr>
<tr>
<td height="16" width="898" colspan="2">
<p style="margin-left: 10" align="left"></td>
</tr>
</table>
<table width="442" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" style="border-collapse: collapse" height="85">
<tr>
<td height="1" width="501">
<p style="margin-left: 10" align="left"></td>
</tr>
<tr>
<td align="left" width="497" height="24">
<p align="center">
<font size="1" face="Verdana" color="#003366">
<img border="0" src="imagens/azul.jpg" width="446" height="9"></font></font></td>
</tr>
<tr>
<td height="1" width="497"></td>
</tr>
<tr>
<td height="59" width="497">
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" b-reverse-chronology="FALSE" s-builtin-fields -->
<p align="center">
<input name="Submit" type="image" value="Enviar!" src="imagens/enviar.jpg" width="134" height="36">
<input name="Reset" type="image" value="Limpar!" src="imagens/limpar.jpg" width="134" height="36">
</form>
<p></td>
</tr>
</table>
</TD>
</TR>
</table>
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td background="0A1633" height="16" width="753" bgcolor="#808080">
<p align="center"><font color="#000033" size="2" class="verdana" >Copyright@2008 - Opção de Qualidade - Todos os direitos reservados</p>
</td>
</tr>
</table>
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td height="16" width="753">
<img src="imagens/azul.jpg" width="755" height="17"></td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
<html>
cursos.jsp
<html>
<head>
<meta http-equiv="Content-Language" content="pt-br">
<title>Integração Universidade / Empresa - Cadastro de Curso</title>
</head>
<body bgcolor="#CBD7DC" vlink="#FFFFFF" link="#FFFFFF" alink="#FFFFFF">
<div align="center">
<%@ page import="java.sql.*"%>
<form action="universitarios.jsp" method="post">
<table width="755" cellpadding="0" cellspacing="0">
<tr>
<td> <img src="imagens/banner.jpg" width="755" height="97"></td>
</tr>
</table>
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" height="1">
<tr>
<td align="left" style="text-indent: 0; margin-left: 0" height="1">
<p align="center"><a href="login_universitario.html">
<img src="imagens/btuniversitarios.jpg" width="161" height="124"></a></td>
<td align="left" style="text-indent: 0; margin-left: 0" height="1">
<p align="center">
<a href="login_empresa.html"><img src="imagens/btempresas.jpg" width="161" height="124"></a>
</td>
<td align="left" style="text-indent: 0; margin-left: 0" height="1">
<p align="center"><a href="login_instituicao.html"><img src="imagens/btinstituicoes.jpg" width="161" height="124"></a></td>
<td align="left" style="text-indent: 0; margin-left: 0" height="1">
<img src="imagens/btcontato.jpg" width="161" height="124" align="right"></td>
</tr>
<tr>
<td height="17" width="3544" colspan="4">
</td>
</tr>
<tr>
<td height="17" width="3544" colspan="4">
<img src="imagens/azul.jpg" width="755" height="17"></td>
</tr>
</table>
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" height="130" style="border-collapse: collapse">
<TR>
<TD width="1" height="122">
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" height="130" style="border-collapse: collapse">
<TR>
<TD width="1" height="122">
<a href="principal.html">
<img src="imagens/home_link.jpg" width="190" height="39"></a><table width="193" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0" height="188" style="border-collapse: collapse">
<TR>
<TD width="1" height="16">
<img src="imagens/azul.jpg" width="192" height="17"></TD>
</TR>
<tr>
<td height="1" width="1">
<a href="link.html">
<img src="imagens/link_link.jpg" width="190" height="39"></a></td>
</tr>
<tr>
<td height="41" width="1">
<img src="imagens/azul.jpg" width="192" height="17"><a href="parceiros.html"><img src="imagens/parceiros_link.jpg" width="190" height="39"></a></td>
</tr>
<tr>
<td height="15" width="1">
<img src="imagens/azul.jpg" width="192" height="17"></td>
</tr>
<tr>
<td height="15" width="1">
<a href="downloads.html">
<img src="imagens/dowloads_link.jpg" width="190" height="39"></a></td>
</tr>
<tr>
<td height="12" width="1">
<img src="imagens/azul.jpg" width="192" height="17"></td>
</tr>
</table>
</TD>
</TD>
<TD width="551" height="122">
<% String
curso,periodo,nota_mec,ano_disciplina,semestre_disciplina,disciplinas;
curso=request.getParameter("curso");
periodo=request.getParameter("periodo");
nota_mec=request.getParameter("nota_mec");
anos_disciplina=request.getParameter("ano_disciplina");
semestre_disciplina=request.getParameter("semestre_disciplina");
disciplinas=request.getParameter("disciplinas");
try
{
//Passo1: Carregar o Driver JDBC
Class.forName("com.mysql.jdbc.Driver").newInstance();
//Passo2: Criar um objeto para Conexao
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/integracao","root","");
//Passo3: Criar um objeto para execucao de consultas
Statement s=con.createStatement();
//Passo4: cadastrar curso
String sql="insert into cursos (curso,periodo,nota_mec,ano_disciplina,semestre_disciplina,disciplinas) values ('"+curso+"','"+periodo+"','"+nota_mec+"','"+ano_disciplina+"','"+semestre_disciplina+"','"+disciplinas+"')";
int rs=s.executeUpdate(sql);
if(rs!=0)
{
out.print("<br><br><center>Você cadastrou o Curso com Sucesso!.</center><br><br>");
}
else
{
out.print("<br><br><center>Erro ao Cadastrar Curso!!!</center><br><br>");
}
s.close();
con.close();
}
catch(ClassNotFoundException e1)
{
out.print("Erro de Conexão JDBC!!!");
}
%>
</TD>
</TR>
</table>
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td background="0A1633" height="16" width="753" bgcolor="#808080">
<p align="center"><font color="#000033" size="2" class="verdana" >Copyright@2008 - Opção de Qualidade - Todos os direitos reservados</p>
</td>
</tr>
</table>
<table width="755" bgcolor="#FFFFFF" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td height="16" width="753">
<img src="imagens/azul.jpg" width="755" height="17"></td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
<html>
codigo para criar tabela cursos
CREATE TABLE `cursos` (
`id_cursos` int(100) unsigned NOT NULL auto_increment,
`Instituicoes_id_cnpj` varchar(255) NOT NULL default '',
`nome` text,
`periodo` tinytext,
`nota_mec` varchar(255) default NULL,
`ano_disciplina` text,
`semestre_disciplina` text,
`disciplinas` varbinary(255) default NULL,
`quantidade_aluno` varchar(255) default NULL,
PRIMARY KEY (`id_cursos`),
KEY `Cursos_FKIndex1` (`Instituicoes_id_cnpj`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1