Provato cosi ma non va...
form.php
Codice HTML:
<form name="form1" action="ProvaReg.php" method="get">
<html>
<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nuova pagina 3</title>
</head>
<body>
<p> </p>
<table border="1" width="357" height="359">
<tr>
<td height="19" width="357" colspan="2">
<p align="center">Sito</td>
</tr>
<tr>
<td height="21" width="127">Nik</td>
<td height="21" width="214">
<input type="text" name="username_formattato" id="username_formattato"></td>
</tr>
<tr>
<td height="17" width="127">Pass</td>
<td height="17" width="214">
<input type="text" name="user_password_formattato" id="user_password_formattato"></td>
</tr>
<tr>
<td height="18" width="127">Email</td>
<td height="18" width="214">
<input type="text" name="user_email_formattato" id="user_email_formattato"></td>
</tr>
<tr>
<td height="18" width="341" colspan="2">
<p align="center">Forum</td>
</tr>
<tr>
<td height="18" width="127">Nik</td>
<td height="18" width="214">
Vale Quello sopra:....</td>
</tr>
<tr>
<td height="17" width="127">Pass</td>
<td height="17" width="214">
<input type="text" name="password_formattato" id="password_formattato"></td>
</tr>
<tr>
<td height="19" width="127">Email</td>
<td height="19" width="214">
<input type="text" name="mail_formattato" id="mail_formattato"></td>
</tr>
<tr>
<td height="24" width="127">
<p align="left">Icq</td>
<td height="24" width="214">
<input type="text" name="user_icq_formattato" id="user_icq_formattato"></td>
</tr>
<tr>
<td height="22" width="127">Msn</td>
<td height="22" width="214">
<input type="text" name="user_msnm_formattato" id="user_msnm_formattato"></td>
</tr>
<tr>
<td height="24" width="341" colspan="2">
<p align="center">
<input type="submit" name="submit" value="Invia" id="submit"></td>
</tr>
<tr>
<td height="59" width="341" colspan="2"> </td>
</tr>
</table>
</body>
</html>
li salvo cosi:
Codice PHP:
<?php
$user = "muitaly";
$pwd = ""; // qui la tua password
$host = "localhost";
$dbase = "my_muitaly";
$db = mysql_connect ($host, $user, $pwd) or die
("Impossibile connettersi al database!");
mysql_select_db ($dbase);
$username_formattato=htmlspecialchars($HTTP_POST_VARS['username']);
$user_password_formattato=htmlspecialchars($HTTP_POST_VARS['user_password']);
$user_email_formattato=htmlspecialchars($HTTP_POST_VARS['user_email']);
$password_formattato=htmlspecialchars($HTTP_POST_VARS['password']);
$mail_formattato=htmlspecialchars($HTTP_POST_VARS['mail']);
$user_icq_formattato=htmlspecialchars($HTTP_POST_VARS['user_icq']);
$user_msnm_formattato=htmlspecialchars($HTTP_POST_VARS['user_msnm']);
if ($_GET['submit'] == 'Invia') {
mysql_query ("INSERT INTO phpbb_users (username, user_password, user_email,user_icq,user_msnm) VALUES ('$username_formattato', '$user_password_formattato', '$user_email_formattato','$user_icq_formattato','$user_msnm_formattato')") or die(mysql_error());
mysql_query ("INSERT INTO sl_user (username, password, mail) VALUES ('$username_formattato', '$password_formattato', 'mail_formattato')") or die(mysql_error());
echo ("Inserimento avvenuto correttamente!"); }
?>