Salve a tutti il mio dannato script continua a dare errori e io non so piu dove sbattere la testa
vi posto umilmente gli errori e il codice...
ERRORI
Notice: Undefined index: lc# in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 4
Notice: Undefined index: l.net in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 5
Notice: Undefined index: lvb in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 6
Notice: Undefined index: lcobol in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 7
Notice: Undefined index: labap/4 in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 8
Notice: Undefined index: lsap in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 9
Notice: Undefined index: lcisco in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 10
Notice: Undefined index: lpython in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 11
Notice: Undefined index: lflash in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 12
Notice: Undefined index: ljava in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 13
Notice: Undefined index: lphp in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 14
Notice: Undefined index: lsql in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 15
Notice: Undefined index: lplsql in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 16
Notice: Undefined index: lmysql in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 17
Notice: Undefined index: linguaggi in C:\Programmi\EasyPHP 3.0\www\c\mod.php on line 32
Error: Il numero delle colonne non corrisponde al conteggio alla riga 1
FORM
<form name="MyForm" action="mod.php" method="POST">
<table>
<tr>
<th rowspan="3">Dati della Risorsa</th>
<td>Nome <input type="text" name="nome"></td>
<td>Cognome <input type="text" name="cognome"></td>
</tr>
<tr>
<td>Data di Nascita <input type="text" name="nascita"> (es. 25/03/1981)</td>
<td>eMail <input type="text" name="email"></td>
</tr>
<tr>
<td>Residenza <input type="text" name="residenza"></td>
<td>Telefono <input type="text" name="telefono"></td>
</tr>
<tr>
<th rowspan="3">Esperienze della Risorsa</th>
<td>Esperienze Lavorative (una per ogni riga)
<textarea name="esp_lavorative" rows="20" cols="50"></textarea></td>
<td>Esperienze Scolastiche (una per ogni riga)
<textarea name="esp_scolastiche" rows="20" cols="50"></textarea></td>
</tr>
<tr>
<td colspan="2">Curriculum Vitae <input type="file" name="cv"></td>
</tr>
<tr>
<td colspan="2">Linguaggi
<input type="checkbox" name="lc" value="c">C
<input type="checkbox" name="lc++" value="c_plus">C++
<input type="checkbox" name="lc#" value="c_sharp">C#
<input type="checkbox" name="l.net" value=".net">.NET
<input type="checkbox" name="lvb" value="vb">VB
<input type="checkbox" name="lcobol" value="cobol">COBOL
<input type="checkbox" name="labap/4" value="abap/4">ABAP/4
<input type="checkbox" name="lsap" value="sap">SAP
<input type="checkbox" name="lcisco" value="cisco">CISCO
<input type="checkbox" name="lpython" value="python">PYTHON
<input type="checkbox" name="lflash" value="flash">FLASH
<input type="checkbox" name="ljava" value="java">JAVA
<input type="checkbox" name="lphp" value="php">PHP
<input type="checkbox" name="lsql" value="sql">SQL
<input type="checkbox" name="lplsql" value="plsql">PLSQL
<input type="checkbox" name="lmysql" value="mysql">MYSQL
</td>
<tr>
<th>Contatto con la Risorsa</th>
<td>Data Contatto <input type="text" name="data_contatto"> (es. 25/03/1981)</td>
<td colspan="2">Esito
<input type="radio" name="esito" value="positivo" checked>Positivo
<input type="radio" name="esito" value="negativo">Negativo
</td>
</tr>
<tr>
<th>Aggiungi la Risorsa</th>
<td colspan="2"><center><input type="submit" name="add" value="Aggiungi Risorsa"></center></td>
</tr>
</tr>
</table>
</form>
MOD.php
<?php
$c=$_POST['lc'];
$cpiu=$_POST['lc++'];
$csharp=$_POST['lc#'];
$net=$_POST['l.net'];
$vb=$_POST['lvb'];
$cobol=$_POST['lcobol'];
$abap=$_POST['labap/4'];
$sap=$_POST['lsap'];
$cisco=$_POST['lcisco'];
$py=$_POST['lpython'];
$fl=$_POST['lflash'];
$jv=$_POST['ljava'];
$php=$_POST['lphp'];
$sqly=$_POST['lsql'];
$plsql=$_POST['lplsql'];
$mysql=$_POST['lmysql'];
$stringa = $c. " " .$cpiu. " " .$csharp. " " .$net. " " .$vb. " " .$cobol. " " .$abap. " " .$sap. " " .$cisco. " " .$py. " " .$fl. " " .$jv. " " .$php. " " .$sqly. " " .$plsql. " " .$mysql. " ".$mysql;
#$section = mysql_escape_string($_POST['lc']);
$con = mysql_connect("localhost","root","mysql");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("fastinformatica", $con);
$sql="INSERT INTO dipendenti (nome, cognome, nascita, email, residenza, telefono, esp_lavorative, esp_scolastiche, data_contatto, esito)
VALUES
('$_POST[nome]','$_POST[cognome]','$_POST[nascita]','$_POST[email]','$_POST[residenza]','$_POST[telefono]','$_POST[esp_lavorative]','$_POST[esp_scolastiche]','$_POST[linguaggi]','$_POST[data_contatto]','$_POST[esito]')";
$query = "INSERT INTO dipendenti (linguaggi) VALUES ('$stringa')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
#Qui eseguo un redirect all'home page
echo"Risorsa aggiunta..." . '<meta http-equiv="refresh" content="10;url=http://localhost/c/gestionale.php">';
#header("location: http://localhost/c/gestionale.php");
mysql_close($con)
?>
</div>
</body>
</html>