Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Polestar 3 Performance, test drive: comodità e potenza possono convivere
Polestar 3 Performance, test drive: comodità e potenza possono convivere
Abbiamo passato diversi giorni alla guida di Polestar 3, usata in tutti i contesti. Come auto di tutti i giorni è comodissima, ma se si libera tutta la potenza è stupefacente
Qualcomm Snapdragon X2 Elite: l'architettura del SoC per i notebook del 2026
Qualcomm Snapdragon X2 Elite: l'architettura del SoC per i notebook del 2026
In occasione del proprio Architecture Deep Dive 2025 Qualcomm ha mostrato in dettaglio l'architettura della propria prossima generazione di SoC destinati ai notebook Windows for ARM di prossima generazione. Snapdragon X2 Elite si candida, con sistemi in commercio nella prima metà del 2026, a portare nuove soluzioni nel mondo dei notebook sottili con grande autonomia
Recensione DJI Mini 5 Pro: il drone C0 ultra-leggero con sensore da 1 pollice
Recensione DJI Mini 5 Pro: il drone C0 ultra-leggero con sensore da 1 pollice
DJI Mini 5 Pro porta nella serie Mini il primo sensore CMOS da 1 pollice, unendo qualità d'immagine professionale alla portabilità estrema tipica di tutti i prodotti della famiglia. È un drone C0, quindi in un peso estremamente contenuto e che non richiede patentino, propone un gimbal rotabile a 225 gradi, rilevamento ostacoli anche notturno e autonomia fino a 36 minuti. Caratteristiche che rendono il nuovo drone un riferimento per creator e appassionati
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 29-01-2006, 22:07   #1
Traxsung
Senior Member
 
L'Avatar di Traxsung
 
Iscritto dal: Apr 2005
Messaggi: 5245
[PHP] Undefined index ???

Cosa significa questo messaggio di errore datomi dal Browser provando uno script php in localo con Easyphp ??

Se può essere utile riporto il listato:


Codice PHP:
if ($_GET["day"]!="" || $_GET["month"]!="" || $_GET["year"]!=""){

            if (
$_GET["day"]!=""){
                
$day $_GET["day"];
            } else {
                
$day "";
            }

            if (
$_GET["month"]!=""){
                
$month $_GET["month"];
            } else {
                
$month $date_today["mon"];
            }

            if (
$_GET["year"]!=""){
                
$year $_GET["year"];
            } else {
                
$year $date_today["year"];
            } 
L'errore me lo da per day, month e year
Traxsung è offline   Rispondi citando il messaggio o parte di esso
Old 29-01-2006, 22:39   #2
Traxsung
Senior Member
 
L'Avatar di Traxsung
 
Iscritto dal: Apr 2005
Messaggi: 5245
mmm.... hai ragione, così non si capisce un granchè.
Ecco l'intero codice:

Codice PHP:
*/

// database functions


function show_error()
{
    die(
"Error " mysql_errno() . " : " mysql_error());
}



function 
sql_quote($input)
{
    return 
"'".$input."'";
}



function 
db_connect()
{

    global 
$db_server;
    global 
$db_username;
    global 
$db_password;
    global 
$db_name;

    
$con mysql_connect($db_server,$db_username,$db_password);
    if (!(
mysql_select_db($db_name,$con)))
    {
        
show_error();
    }

    return 
$con;
}



function 
db_disconnect($con)
{
    
close($con);
}


function 
db_prepare(){

    global 
$viewmode;
    
    global 
$day;
    global 
$month;
    global 
$year;
    
    global 
$list_rows;
    global 
$view_rows;
    global 
$view_comment_rows;

    global 
$viewcomments;

    
// connect to the database
    
$con db_connect();
    
$blogid="";
    
$date_today getdate();

    
// work out what to show based on URL parameters
    
;
    if (
$_POST["blogid"]!="") {

        
$blogid $_GET["blogid"];

        
// get the blog entry from the database to find out what month it was (for the list and view sql)
        
$sql_findmonth "SELECT *,MONTH(dEntryDate) AS month,YEAR(dEntryDate) AS year FROM blog WHERE nIdCode=".$blogid;
        
$result mysql_query($sql_findmonth,$con);
        if (
$result!=false) {
            
$row mysql_fetch_array($result);
            
$month $row["month"];
            
$year $row["year"];
        } else {
            
// revert to nothing sent
            
$blogid="";
        }

        
$sql_list "SELECT * FROM blog WHERE MONTH(dEntryDate)=".$month." ORDER BY dEntryDate DESC;";
        if (
$viewmode=="single"){
            
$sql_view "SELECT * FROM blog WHERE nIdCode=".$_GET["blogid"].";";
        } else {
            
$sql_view "SELECT * FROM blog WHERE MONTH(dEntryDate)=".$month." ORDER BY dEntryDate DESC;";
        }

    }

    if (
$blogid=="") {

        
// Figure out what parts of the date we have got

        
if ($_GET['day']!="" || $_GET['month']!="" || $_GET['year']!=""){

            if (
$_GET['day']!=""){
                
$day $_GET['day'];
            } else {
                
$day "";
            }

            if (
$_GET["month"]!=""){
                
$month $_GET["month"];
            } else {
                
$month $date_today["mon"];
            }

            if (
$_GET["year"]!=""){
                
$year $_GET["year"];
            } else {
                
$year $date_today["year"];
            }

        } else {

            
$day "";
            
$month $date_today["mon"];
            
$year $date_today["year"];

        }

        
// Build the SQL statements

        
if ($day!=""){

            
$sql_list "SELECT * FROM blog WHERE MONTH(dEntryDate)=".$month." AND YEAR(dEntryDate)=".$year." AND DAYOFMONTH(dEntryDate)=".$day." ORDER BY nIdCode DESC;";
            if (
$viewmode == "single"){
                
$sql_view "SELECT * FROM blog WHERE MONTH(dEntryDate)=".$month." AND YEAR(dEntryDate)=".$year." AND DAYOFMONTH(dEntryDate)=".$day." ORDER BY nIdCode DESC;";
            } else {
                
$sql_view "SELECT * FROM blog WHERE MONTH(dEntryDate)=".$month." AND YEAR(dEntryDate)=".$year." ORDER BY nIdCode DESC;";
            }

        } else {

            
$sql_list "SELECT * FROM blog WHERE MONTH(dEntryDate)=".$month." AND YEAR(dEntryDate)=".$year." ORDER BY nIdCode DESC;";
            if (
$viewmode == "single"){
                
$sql_view "SELECT * FROM blog WHERE MONTH(dEntryDate)=".$month." AND YEAR(dEntryDate)=".$year." ORDER BY nIdCode DESC LIMIT 1;";
            } else {
                
$sql_view "SELECT * FROM blog WHERE MONTH(dEntryDate)=".$month." AND YEAR(dEntryDate)=".$year." ORDER BY nIdCode DESC;";
            }
        }
    }


    
// Get data from the database (store in arrays)

    
$list_result mysql_query($sql_list,$con);
    
$view_result mysql_query($sql_view,$con);

    
// Build List Array
    
if ($list_result!=false) {
        
$i=0;
        while (
$list_row =@ mysql_fetch_array($list_result)){
            
$i++;
            
$list_rows[$i] = $list_row;
        }
    } else {
        
$problem "1";
    }

    
// Build View Array
    
if ($view_result!=false) {
        
$i=0;
        while (
$view_row =@ mysql_fetch_array($view_result)){
            
$i++;
            
$view_rows[$i] = $view_row;

            
// build view_comments array
            
if ($viewcomments=="yes") {
                
$sql "SELECT * FROM blog_comments WHERE nBlogId=".$view_row["nIdCode"]." ORDER BY nIdCode DESC";
                
$result mysql_query($sql,$con);
                if (
$result!=false){
                    
$j=0;
                    while (
$comment_row =@ mysql_fetch_array($result)){
                        
$j++;
                        
$view_comment_rows[$i][$j] = $comment_row;
                    }
                }
            }
        }
    } else {
        
$problem "2";
    }

    
// increment view counter for either the single blog being shown
    // or ALL blogs being shown
    
if ($view_rows[1]["nIdCode"]!=""){
        if (
$viewmode=="single"){
            
$blogid $view_rows[1]["nIdCode"];
            
$sql "UPDATE blog SET nViews=nViews+1 WHERE nIdCode=".$blogid;
        } else {
            for (
$i=1;$i<=count($view_rows);$i++){
                
$blog_array[$i] = $view_rows[$i]["nIdCode"];
            }
            
$blogids implode(",",$blog_array);
            
$sql "UPDATE blog SET nViews=nViews+1 WHERE nIdCode IN (".$blogids.")";
        }
        
$result mysql_query($sql,$con);
        if (
$result==false){
            print 
"<li>Problem with SQL<br>[".$sql."]</li>\n";
        }
    }
}

function 
db_hitcount(){
    
$con db_connect();
    
$sql "SELECT SUM(nViews) AS nTotal FROM blog";
    
$result mysql_query($sql,$con);
    if (
$result!=false){
        
$row mysql_fetch_array($result);
        
$total $row["nTotal"];
    } else {
        
$total 0;
    }
    return 
$total;
}

?> 
Ah... ti ricordo che lo sto testando in locale
Traxsung è offline   Rispondi citando il messaggio o parte di esso
Old 30-01-2006, 20:40   #3
Traxsung
Senior Member
 
L'Avatar di Traxsung
 
Iscritto dal: Apr 2005
Messaggi: 5245
dai ragazzi.... ho bisogno urgentemente di un'aiuto
Traxsung è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Polestar 3 Performance, test drive: comodità e potenza possono convivere Polestar 3 Performance, test drive: comodit&agra...
Qualcomm Snapdragon X2 Elite: l'architettura del SoC per i notebook del 2026 Qualcomm Snapdragon X2 Elite: l'architettura del...
Recensione DJI Mini 5 Pro: il drone C0 ultra-leggero con sensore da 1 pollice Recensione DJI Mini 5 Pro: il drone C0 ultra-leg...
ASUS Expertbook PM3: il notebook robusto per le aziende ASUS Expertbook PM3: il notebook robusto per le ...
Test ride con Gowow Ori: elettrico e off-road vanno incredibilmente d'accordo Test ride con Gowow Ori: elettrico e off-road va...
Il nuovo Qualcomm Snapdragon 8 Gen 5 stu...
Sky e Amazon trasmetteranno la Champions...
'Robot abbastanza forti da fratturare un...
Anche DAZN ha il suo Black Friday: 40 eu...
Carmageddon: Rogue Shift, il prossimo ca...
Redal Alert 2: Command & Conquer si ...
Kingston Technology: memorie e storage c...
Narwal Freo Z10 Ultra: il robot con moci...
In 3 minuti le vedete tutte: sono le mig...
Black Friday da record per Tineco: le sc...
La nuova PS5 con Fortnite manda in tilt ...
Amazon, i tagli hanno colpito soprattutt...
Pazzesco: Panasonic Lumix DC-GH5M2E a 79...
Ecco tutte le offerte Black Friday pi&ug...
DJI Neo a 169€, Flip Combo a 309€ e molt...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 04:05.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Served by www3v