Inizia col postare correttamente tutto il codice tra i tag PHP così riusciamo ad aiutarti meglio