Allora, quando vado alla pagina Registrazione.php non mi salva i dati della registrazione nel database.
Il codice della pagina /Registrazione/index.php è questo
Metto anche quello del form html della pagina /Registrati/index.htmlCodice PHP:<?php
$host="localhost"; // Hostname
$username="theclashclan"; // Mysql username
$password=""; // Mysql password
$db_name="my_theclashclan"; //Nome del Database
$tbl_name="Utenti_Clan"; // Nome della Tabella
$db = mysql_connect($localhost,$username,$password);
mysql_select_db($db_name,$db);
$id = $_GET['id'];
$username = $_GET['username'];
$password = $_GET['password'];
$email = $_GET['email'];
$nome_clan = $_GET['nome_clan'];
$livello_clan = $_GET['livello_clan'];
$membri_clan = $_GET['membri_clan'];
mysql_query("INSERT INTO ".$tbl_name." (email,username,password,nome_clan,livello_clan,membri_clan) VALUES ('$email','$username','$password','$nome_clan','$livello_clan','$membri_clan')",$db)
?>
Grazie a tutti in anticipoCodice HTML:<form method="GET" action="/Registrazione" ><br> La tua Email <input type="text" name="email" ><br> Il tuo username (lo userai per accedere al tuo account) <input type="text" name="username" ><br> La tua password (la userai per accedere al tuo account) <input type="text" name="password" ><br> Il nome del tuo clan <input type="text" name="nome_clan" ><br> Il livello del tuo clan <input type="text" name="livello_clan" ><br> Il numero dei membri del tuo clan <input type="text" name="membri_clan" ><br> <input type="submit" name="OK" value="OK"> </form>

1Likes
LinkBack URL
About LinkBacks

