| Home  | Casa  | Hardware  | Networking  | Programmazione  | Software  | Domanda  | Sistemi  |   
Programmazione  
  • C /C + + Programming

  • Computer Programming Languages

  • Delphi Programming

  • Java Programming

  • Programmazione Javascript

  • PHP /MySQL Programmazione

  • Perl Programming

  • Python Programming

  • rubino Programmazione

  • Nozioni di base di Visual Programming
  •  
    Conoscenza Informatica >> Programmazione >> PHP /MySQL Programmazione >> Content
    Tutorial su forme semplici Registrazione PHP
    una delle più preziose risorse che si possono creare e coltivare con un sito web è una mailing list o la registrazione . Questa lista rappresenta le persone che hanno avuto il tempo di registrare perché sono interessati ai tuoi prodotti o servizi , che li rende potenziali acquirenti ideali . È possibile creare un semplice modulo di registrazione con PHP e MySQL per iniziare a creare questa lista prezioso . Istruzioni , creare database MySQL
    1

    Entra a MySQL dalla riga di comando o utilizzando un programma come phpMyAdmin . Creare un database MySQL per memorizzare i dati di registrazione . Ad esempio, digitare :

    CREATE DATABASE ` di registrazione ` default CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
    2

    Creare una tabella nel database per memorizzare gli indirizzi di posta elettronica degli utenti e dei nomi . Ad esempio, digitare :

    CREATE TABLE ` junk ` ` utenti ` (

    `email` VARCHAR ( 254 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL , ` nome

    . ` VARCHAR ( 254 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL , Stati

    PRIMARY KEY ( ` email ` ) per

    ) ENGINE = MyISAM CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
    < br > 3

    inserire un record nel database a scopo di test . Ad esempio, digitare :

    INSERT INTO ` di registrazione ` ` utenti ` (` email` , `name` ) VALUES ( ' tom@example.com ', ' Tom Jones ');
    < br . >
    Modulo di registrazione Create e variabili
    4

    creare un nuovo file PHP . Inizializzare le variabili per l'indirizzo di posta elettronica e il nome e li uguale ai dati inviati dal modulo se il modulo è stato inviato . Ad esempio, digitare :

    < php

    $ mail = ( isset ( $ _POST [ "email" ] ) ) ? ? $ _POST [ " Email " ] : " " ;

    $ nome = ( isset ( $ _POST [ " nome " ] ) ) ? $ _POST [ " Nome " ] : "" ;

    >
    5

    Aggiungi le intestazioni HTML al file PHP . Ad esempio, digitare : !

    < DOCTYPE HTML PUBLIC " - //W3C //DTD XHTML 1.0 Transitional //EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1 - transitional.dtd ">



    < p >

    Modulo di Registrazione < /title> <br> < p > < /head> <br> <p> <body> <br> 6 <p> Aggiungere un modulo di registrazione HTML . Impostare l'azione di chiamare lo stesso file PHP e impostare il metodo di " postare ". Ad esempio, digitare : <br> <p> Modulo di registrazione <h2> < /h2 > <br> <p> < form action = "< php echo htmlentities ( $ _SERVER [ PHP_SELF ] ) ; > ? " method = " post " > <br> <p> <strong> Inserisci la tua email : < input type = " " name = " text " width = " email " value =" 40 < ? php echo $ email ; > " /> < /p > <br> <p> <strong> Inserisci il tuo nome : < input type = " ? " name = " text " name = width il valore " 40 " = " < php echo $ nome ; ? ? > " /> < /p = nome " submit" value = > <br> <p> < input type "invia" = "Registrati" /> < /p > <br> <p> < /form > <br> 7 <p> Controllare se l'e-mail e le variabili name sono popolate e ritorno se il form ha non è ancora stata presentata . ? Ad esempio, digitare : <br> <p> < php <br> <p> if ( $ email == " " <div class=ad2><script language='javascript' src='/ad/201310/4.js'></script></div> </div> </td> </tr> </table> <table width="95%" height="1" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#DEE7EE"> <tr> <td></td> </tr> </table> <table width="100%" height="7" border="0" cellpadding="0" cellspacing="0"> <tr> <td></td> </tr> </table> <table width="91%" height="52" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="51%"><p>Previous : <a class='LinkPrevArticle' href='/Programmazione/php-mysql-programming/92396.html' >Come per troncare tutto dopo un carattere in PHP </a></li></p></td> </tr> <tr> <td width="49%"> next : <a class='LinkNextArticle' href='/Programmazione/php-mysql-programming/92398.html' >Come sapere MySQL è in esecuzione sul server </a></li></td> </tr> </table></td> </tr> </table> <table width="100%" height="7" border="0" cellpadding="0" cellspacing="0"> <tr> <td></td> </tr> </table> <table width="770" height="246" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="375" height="246" valign="top"><table width="380" border="0" cellpadding="0" cellspacing="0" class="bian"> <tr> <td height="244" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="img_dm/danmai_r4_c04 -.jpg" bgcolor="#DBE3EE"> <tr> <td width="4%" height="29"> </td> <td width="96%" class="lan_lm"> Articoli Correlati </td> </tr> </table> <table width="95%" height="209" border="0" align="center" cellpadding="0" cellspacing="4"> <tr> <td height="201"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/91660.html" title="PHP Tutorial Scratch Card " target="_self">PHP Tutorial Scratch Card </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/92271.html" title="Come migliorare il calcolo matematico in PHP " target="_self">Come migliorare il calcolo matematico in PHP </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/91401.html" title="Come Redirect Email a un programma PHP Desk " target="_self">Come Redirect Email a un programma PHP Desk </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/91783.html" title="Come disattivare i trigger in MySQL " target="_self">Come disattivare i trigger in MySQL </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/91956.html" title="Come Drop Off il decimale in PHP " target="_self">Come Drop Off il decimale in PHP </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/92083.html" title="Come eseguire pagine PHP da cron ? " target="_self">Come eseguire pagine PHP da cron ? </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/92302.html" title="Come abilitare PHP per rilevare il sistema operativo " target="_self">Come abilitare PHP per rilevare il sistema operativo </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/92513.html" title="Come emettere Sequenza di uscita su file in PHP " target="_self">Come emettere Sequenza di uscita su file in PHP </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/92732.html" title="Come aggiornare un record in MySQL " target="_self">Come aggiornare un record in MySQL </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/92413.html" title="Come cancellare il contenuto di un file PHP " target="_self">Come cancellare il contenuto di un file PHP </a></td></tr><tr></tr></table></td> </tr> </table></td> </tr> </table></td> <td width="20" valign="top"></td> <td width="375" valign="top"><table width="380" border="0" cellpadding="0" cellspacing="0" class="bian"> <tr> <td height="244" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="img_dm/danmai_r4_c04 -.jpg" bgcolor="#DBE3EE"> <tr> <td width="4%" height="29"> </td> <td width="96%" class="lan_lm">Articoli in evidenza </td> </tr> </table> <table width="95%" height="207" border="0" align="center" cellpadding="0" cellspacing="4"> <tr> <td height="199"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/java-programming/89683.html" title="Come modificare l'interlinea in NetBeans " target="_self">Come modificare l'interlinea in NetBeans </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/visual-basics-programming/94577.html" title="Come scrivere KOP Utilizzando Visual Basic " target="_self">Come scrivere KOP Utilizzando Visual Basic </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/computer-programming-languages/87947.html" title="Come sviluppare una applicazione Bluetooth " target="_self">Come sviluppare una applicazione Bluetooth </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/92387.html" title="PHP script per caricare più file " target="_self">PHP script per caricare più file </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/cc-programming/85298.html" title="Tipi di Format String Bug " target="_self">Tipi di Format String Bug </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/python-programming/94000.html" title="Come interpretare una stringa come un valore booleano in Python " target="_self">Come interpretare una stringa come un valore booleano i…</a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/computer-programming-languages/88611.html" title="Introduzione alla Pseudocodice " target="_self">Introduzione alla Pseudocodice </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/91460.html" title="PHP Parse Opzioni " target="_self">PHP Parse Opzioni </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/php-mysql-programming/92989.html" title="Come formattare i numeri di telefono in PHP " target="_self">Come formattare i numeri di telefono in PHP </a></td></tr><tr><td width="10" valign="top" class="">·</td><td class=""><a class="" href="/Programmazione/visual-basics-programming/95627.html" title="Come salvare un oggetto OLE di una tabella di Access utilizzando Visual Basic " target="_self">Come salvare un oggetto OLE di una tabella di Access ut…</a></td></tr><tr></tr></table></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> </table> <table width="980" height="8" border="0" cellpadding="0" cellspacing="0"> <tr> <td></td> </tr> </table> <table border=0 cellSpacing=0 cellPadding=0 width=980 bgColor=#36506e height=90> <tr> <td class=bs height=90 align=middle>Copyright © Conoscenza Informatica http://it.wingwit.com <script language='javascript' src='/ad/201310/1.js'></script></td> </tr> </table> </div> </body> </html>