Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 12

Discussione: [php] problema form

  1. #1

    [php] problema form

    http://nopaste.coredumps.org/?563

    come mai nelle form dove inserire i voti mi viene fuori



    Notice: Undefined variable: s1p1 in crogrammieasyphp1-7wwwfanta_dbformazioni1.php on line 88

    Notice: Undefined variable: s1p1 in crogrammieasyphp1-7wwwfanta_dbformazioni1.php on line 88


    ?

    grazie mille

  2. #2
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    la variabile $s1p1 non è definita, posta il codice
    think simple think ringo

  3. #3
    Originariamente inviato da marketto
    la variabile $s1p1 non è definita, posta il codice

    il codice è il link sopra, e comunque le definisco nel link del form, in invia.php

  4. #4
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    modifica il codice così:
    codice:
    <? if (isset($s1p1) && $s1p1 != "0") { echo "$s1p1";}?>
    think simple think ringo

  5. #5
    nada, sempre


    Notice: Undefined variable: s1p1 in crogrammieasyphp1-7wwwfanta_dbformazioni1.php on line 88

    Notice: Undefined variable: s1p1 in crogrammieasyphp1-7wwwfanta_dbformazioni1.php on line 88



    non vorrei che sia sbagliato il while...
    perchè quell'azione la deve fare praticamente sempre

  6. #6
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    prova a controllare che la query venga eseguita correttamente...
    codice:
    $result = mysql_query($sql) or die(mysql_error());
    think simple think ringo

  7. #7
    ehm...
    come faccio a vederlo?

    perchè ti spiego: io controllo se squadra1_id è uguale a 1. solo che lo è una sola volta dato che poi si auto incrementa...

  8. #8
    nessuno sa darmi una zampa?

    tnx

  9. #9
    Utente di HTML.it L'avatar di *Ray*
    Registrato dal
    Oct 2000
    Messaggi
    495
    Quando la variabile non e' impostata vuole dire che il while non viene eseguito perche' evidentemente nessuna riga della tabella soddisfa la SELECT.

    Il messaggio che ti da in ogni caso non e' un errore ma un NOTICE. Ti consiglio di togliere quel tipo di notice dal php.ini; li' dentro trovi una sezione tipo questa:

    codice:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Error handling and logging ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ; error_reporting is a bit-field.  Or each number up to get desired error
    ; reporting level
    ; E_ALL             - All errors and warnings
    ; E_ERROR           - fatal run-time errors
    ; E_WARNING         - run-time warnings (non-fatal errors)
    ; E_PARSE           - compile-time parse errors
    ; E_NOTICE          - run-time notices (these are warnings which often result
    ;                     from a bug in your code, but it's possible that it was
    ;                     intentional (e.g., using an uninitialized variable and
    ;                     relying on the fact it's automatically initialized to an
    ;                     empty string)
    ; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
    ; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
    ;                     initial startup
    ; E_COMPILE_ERROR   - fatal compile-time errors
    ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
    ; E_USER_ERROR      - user-generated error message
    ; E_USER_WARNING    - user-generated warning message
    ; E_USER_NOTICE     - user-generated notice message
    ;
    ; Examples:
    ;
    ;   - Show all errors, except for notices
    ;

  10. #10
    ah---
    e come mai mi hanno sempre detto che i notice sono importanti??

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.