Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Oracle AI World 2026: in Europa prima la sovranità, poi la sicurezza e solo dopo l'IA
Oracle AI World 2026: in Europa prima la sovranità, poi la sicurezza e solo dopo l'IA
In tre giorni a Las Vegas Oracle ha presentato agenti che eseguono il lavoro, l'alleanza con OpenAI e un cloud aperto agli acceleratori di tutti. Ma i clienti europei chiedono garanzie prima ancora delle funzionalità
DS N°7 E-Tense: il SUV premium made in Melfi che punta su autonomia e comfort
DS N°7 E-Tense: il SUV premium made in Melfi che punta su autonomia e comfort
Fino a 740 km WLTP con la batteria da 97,2 kWh, sospensioni che leggono la strada con una telecamera e un abitacolo da salotto parigino. La nuova DS N°7 raccoglie l'eredità della DS 7 e la porta, per la prima volta, nel mondo 100% elettrico. Ecco come è fatta, cosa offre e quanto costa.
Recensione Samsung Galaxy Tab S12 Ultra: non chiamatelo tablet... è molto di più
Recensione Samsung Galaxy Tab S12 Ultra: non chiamatelo tablet... è molto di più
Abbiamo provato Samsung Galaxy Tab S12 Ultra nella versione 12 GB + 256 GB con tastiera, e il risultato è un tablet che in questa configurazione si comporta come un notebook con la fluidità tipica di Android. Spessore di 5,1 mm, display Dynamic AMOLED 2X da 14,6 pollici, MediaTek Dimensity 9500 e un software senza incertezze compongono un prodotto di vertice, con prezzi da 1.539 euro, frenato solo da un'autonomia nella parte bassa del confronto
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


Oracle AI World 2026: in Europa prima la sovranità, poi la sicurezza e solo dopo l'IA Oracle AI World 2026: in Europa prima la sovrani...
DS N°7 E-Tense: il SUV premium made in Melfi che punta su autonomia e comfort DS N°7 E-Tense: il SUV premium made in Melfi...
Recensione Samsung Galaxy Tab S12 Ultra: non chiamatelo tablet... è molto di più Recensione Samsung Galaxy Tab S12 Ultra: non chi...
Hyundai IONIQ 5 N, l'elettrica che finge di essere termica (e ci riesce da paura) Hyundai IONIQ 5 N, l'elettrica che finge di esse...
CES Unveiled Milan, l'IA diventa tecnologia fondativa e il commercio torna centrale CES Unveiled Milan, l'IA diventa tecnologia fond...
L’ex CEO di Intel Gelsinger punta su una...
Techly, quattro nuovi supporti TV fra mo...
Mass Effect sacrificato per Star Wars: i...
Gemini, addio al copia e incolla per cor...
13 miliardi per un colpo di stato? NVIDI...
L'agente AI Wabi crea mini-app su misura...
Edge è il primo browser a supportare Acc...
L'IA di Firefox ora compila i moduli da ...
Tracking pixel nelle email: cosa cambia ...
La GeForce RTX 5080 da 24 GB potrebbe ar...
Apple mette alle strette OpenAI, la caus...
Xbox ancora in calo: ecco com'è a...
Car of the Year 2027: sette finaliste e ...
Google Beam cambia tutto: arrivano le vi...
Curry Barker, il regista di Obsession, p...
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: 18:30.


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