Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    [PHP]problema porting da win a linux

    Salve a tutti, sono antonio,
    Ultimamente sto avendo parecchi problemi con un mio dominio acquistato (non faccio pubblicità) visto che ho deciso di prendere l'hosting su spazio linux anzichè win (perchè sembrava + vantaggioso visto che ho librerie GD, posso settare i file come voglio anche a 777 etc)Ho semplicemente trasferito tutte le pagine da uno spazio all'altro ma stranamente quando avvio la pagina non mi funge nulla( più che altro credo ci sia un problema di sintassi Mysql che prima non riscontravo). La cosa strana è che non mi da errore di nessun genere ne notice ne parse...
    Posto il codice... potete darmi una mano?
    P.S.: Scusate ma quando scrivo il codice non essendo un programmatore nato sono un po grezzo.

  2. #2
    <?
    include ("funzioni1.php");
    include("../_private/login.php");
    session_start();
    $ctl=0;
    $nosess=0;



    IF(isset($_GET['distruggi'])){session_unset(); $nosess=1;}
    if(isset($_GET['aggiungi'])){
    $aggiungi=$_GET['aggiungi'];
    $art=$_GET['articolo'];
    $prezzo=$_GET['prezzo'];
    $quant=1;
    $peso=$_GET['peso'];
    @$aggid=$_GET['ido']; };
    @$nuovoid=$_GET['id'];
    if(!empty($aggid)AND $aggiungi=="aggiungi"){
    $ctl=1;
    $_SESSION['carrello'][]=array(
    "id"=>$aggid,
    "articolo" =>$art,
    "prezzo"=>$prezzo,
    "quant"=>$quant,
    "peso"=>$peso
    );



    };
    $idpieno=0;
    if(!empty($nuovoid)){

    $connessione= mysql_connect($host,$user,$pass)or die (mysql_error());
    mysql_select_db($dbbb)or die('impossibile accedere al database');
    $tabello= mysql_query("SELECT * FROM vetrina WHERE (id =$nuovoid )")or die(mysql_error());
    @$arrato=mysql_fetch_array($tabello);
    $idpieno=1;
    };
    //$cicli=count($_SESSION['carrello']);
    @$carrello=$_SESSION['carrello'];
    $uova=0;
    IF(!empty($carrello)){$uova=1;}

    @$pagin=$_GET['pagina'];
    if(!isset($pagin))$pagin=1;
    $nart=4;
    $start=($pagin-1)*4;
    $end=$start+4;
    $connessione= mysql_connect($host,$user,$pass)or die (mysql_error());
    mysql_select_db($dbbb)or die('impossibile accedere al database');
    $tabello= mysql_query("SELECT * FROM `vetrina` ORDER BY ID DESC LIMIT $start,$end")or die(mysql_error());
    $el=mysql_num_rows($tabello);
    $npag=$el/4;
    $adder=0;
    if(!is_int($npag))$adder=1;

    while($birulenzo=mysql_fetch_array($tabello)){
    $esposto[]=$birulenzo;
    };
    $ultimo=$esposto[0];
    @$penultimo=$esposto[1];
    @$terzultimo=$esposto[2];
    @$quartultimo=$esposto[3];
    $ul_foto=$ultimo['immagine'];
    $pen_foto= $penultimo['immagine'];
    $ter_foto= $terzultimo['immagine'];
    $quar_foto=$quartultimo['immagine'];


    ?>
    <html>

    <head>
    <title>Multimedia Paradise | Vetrina - Powered By resetstudio.it</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <style type="text/css" media="screen"><!--
    .Articolo { color: #666; font-size: 12pt; font-family: Verdana; font-weight: bold; text-align: center }
    .Descrizione { color: #333; font-size: 8pt; font-family: Verdana; font-weight: normal; margin-top: 0; margin-right: 3pt; margin-left: 3pt; padding-top: 0 }
    .Prezzo { color: #fff; font-size: 9pt; font-family: Verdana; font-weight: bold; background-image: url(redprice.jpg) }
    .carrello1 { color: #fff; font-size: 12px; font-family: Helvetica; text-align: right }
    .carrello2 { color: #ff0; font-size: 12px; font-family: Helvetica; text-align: center }
    .carrello3 { color: #f03; font-size: 12px; font-family: Helvetica; text-align: center }
    .Multimedia { color: #6c0; font-size: 30px; font-family: Helvetica; font-weight: bold }
    .Paradise { color: #666; font-size: 30px; font-family: Helvetica }
    --></style>

    </head>

    <body bgcolor="#FFFFFF" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
    <div align="center">
    <table width="745" border="0" cellspacing="0" cellpadding="0" align="center" height="673">
    <tr>
    <td></td>
    <td width="737">[img]spacer.gif[/img]</td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td width="737">
    <table id="Table_01" width="731" border="0" cellspacing="0" cellpadding="0" height="511">
    <tr>
    <td colspan="3">[img]images/vetrinatagli_01.jpg[/img]<map name="vetrinatagli_017a0398"><area shape="rect" coords="407,1,724,37" href="http://www.multimediaparadise.it/index.php" alt=""></map></td>
    <td>[img]spacer.gif[/img]</td>
    </tr>
    <tr>
    <td colspan="2">[img]images/vetrinatagli_02.jpg[/img]</td>
    <td>[img]images/vetrinatagli_03.jpg[/img]</td>
    <td>[img]spacer.gif[/img]</td>
    </tr>
    <tr>
    <td>[img]images/vetrinatagli_04.jpg[/img]</td>
    <td rowspan="2" colspan="2">
    <table width="467" border="0" cellspacing="2" cellpadding="0" height="361">
    <tr height="50%">
    <td width="50%" height="50%">
    <table width="228" border="0" cellspacing="2" cellpadding="0">
    <tr height="27">
    <td colspan="2" width="196" height="27">
    <p class="Articolo"><? print $ultimo['articolo']; ?></p>
    </td>
    </tr>
    <tr height="128">
    <td width="96" height="128">[img]vetrifoto/<? immagindo($ul_foto); ?>[/img]</td>
    <td width="96" height="128">
    <p class="Descrizione"><? print $ultimo['descrizione']; ?></p>
    </td>
    </tr>
    <tr height="28">
    <td width="96" height="28">&aggiungi=aggiungi'>[img]addcart.jpg[/img]</td>
    <td width="96" height="28">
    <p class="Prezzo">Prezzo &euro; <? print $ultimo['prezzo']; ?></p>
    </td>
    </tr>
    </table>
    </td>
    <td width="50%" height="50%">
    <table width="228" border="0" cellspacing="2" cellpadding="0">
    <tr height="27">
    <td colspan="2" width="196" height="27">
    <p class="Articolo"><? print $penultimo['articolo']; ?></p>
    </td>
    </tr>
    <tr height="128">
    <td width="96" height="128">[img]vetrifoto/<? immagindo ($pen_foto); ?>[/img]</td>
    <td width="96" height="128">
    <p class="Descrizione"><? print $penultimo['descrizione']; ?></p>
    </td>
    </tr>
    <tr height="28">
    <td width="96" height="28">&aggiungi=aggiungi'>[img]addcart.jpg[/img]</td>
    <td width="96" height="28">
    <p class="Prezzo">Prezzo &euro; <? print $penultimo['prezzo']; ?></p>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr height="50%">
    <td width="50%" height="50%">
    <table width="228" border="0" cellspacing="2" cellpadding="0">
    <tr height="27">
    <td colspan="2" width="196" height="27">
    <p class="Articolo"><? print $terzultimo['articolo']; ?></p>
    </td>
    </tr>
    <tr height="128">
    <td width="96" height="128">[img]vetrifoto/<? immagindo ($ter_foto); ?>[/img]</td>
    <td width="96" height="128">
    <p class="Descrizione"><? print $terzultimo['descrizione']; ?></p>
    </td>
    </tr>
    <tr height="28">
    <td width="96" height="28">&aggiungi=aggiungi'>[img]addcart.jpg[/img]</td>
    <td width="96" height="28">
    <p class="Prezzo">Prezzo &euro; <? print $terzultimo['prezzo']; ?></p>
    </td>
    </tr>
    </table>
    </td>
    <td width="50%" height="50%">
    <table width="228" border="0" cellspacing="2" cellpadding="0">
    <tr height="27">
    <td colspan="2" width="196" height="27">
    <p class="Articolo"><? print $quartultimo['articolo']; ?></p>
    </td>
    </tr>
    <tr height="128">
    <td width="96" height="128">[img]vetrifoto/<? immagindo ($quar_foto); ?>[/img]</td>
    <td width="96" height="128">
    <p class="Descrizione"><? print $quartultimo['descrizione']; ?></p>
    </td>
    </tr>
    <tr height="28">
    <td width="96" height="28">&aggiungi=aggiungi'>[img]addcart.jpg[/img]</td>
    <td width="96" height="28">
    <p class="Prezzo">Prezzo &euro; <? print $quartultimo['prezzo']; ?></p>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    <td>[img]spacer.gif[/img]</td>
    </tr>
    <tr>
    <td rowspan="2">[img]images/vetrinatagli_06.jpg[/img]<map name="5d7"><area shape="rect" coords="45,50,222,69" href="http://www.resetstudio.it" alt=""></map></td>
    <td>[img]spacer.gif[/img]</td>
    </tr>
    <tr>
    <td colspan="2" background="images/vetrinatagli_07.jpg">
    <div align="center">
    <? //usando $npag creo i link per la paginazione
    $tabello= mysql_query("SELECT * FROM `vetrina` ORDER BY ID DESC")or die(mysql_error()); $el=mysql_num_rows($tabello); $npag=$el/4; $adder=0; if(!is_int($npag))$adder=1; $npag=intval($npag+$adder); $pagg=1; while($npag>0){ print "<a href=vetrina.php?pagina=$pagg>$pagg</a>"; $pagg++; $npag--; }; ?></div>
    </td>
    <td>[img]spacer.gif[/img]</td>
    </tr>
    <tr>
    <td>[img]spacer.gif[/img]</td>
    <td>[img]spacer.gif[/img]</td>
    <td>[img]spacer.gif[/img]</td>
    <td></td>
    </tr>
    </table>

    <table width="730" border="0" cellspacing="0" cellpadding="0">
    <tr height="26">
    <td colspan="5" bgcolor="white" width="731" height="26">
    <div align="left">
    [img]carup.jpg[/img]</div>
    </td>
    </tr>
    <tr bgcolor="#86ae0d" height="19">
    <td class="carrello1" bgcolor="#86ae0d" width="100" height="19">Cod. Articolo |</td>
    <td class="carrello1" bgcolor="#86ae0d" width="99" height="19">Quantità |</td>
    <td class="carrello1" bgcolor="#86ae0d" width="195" height="19">Articolo |</td>
    <td class="carrello1" bgcolor="#86ae0d" width="146" height="19">Prezzo Unitario |</td>
    <td class="carrello1" bgcolor="#86ae0d" width="177" height="19"><div align="center">
    Totale</div></td>
    </tr>
    <? if($nosess==0){
    $cicli=count($carrello);
    $indice=$cicli-1;
    while($cicli>0){
    print "<tr bgcolor=#86ae0d class=carrello3><td>".$carrello[$indice]['id']."</td>";
    print "<td>".$carrello[$indice]['quant']."</td>";
    print "<td>".$carrello[$indice]['articolo']."</td>";
    print "<td> &euro; ".$carrello[$indice]['prezzo']."</td>";
    print "<td> &euro;".($carrello[$indice]['prezzo']*$carrello[$indice]['quant'])."</td></tr>";
    $cicli--;
    $indice--;
    }

  3. #3
    $cicli=count($carrello);
    $indice=$cicli-1;
    $peso_car=0;
    while($cicli>0){
    $peso_car=$peso_car+($carrello[$indice]['peso']*$carrello[$indice]['quant']);
    $cicli--;
    $indice--;
    }
    if($peso_car < 10)$sped=9.60;
    if($peso_car>10 AND $peso_car<=30)$sped=12.00;
    if($peso_car>30 AND $peso_car<=50)$sped=14.00;
    if($peso_car>50)$sped=24.00;

    $cicli=count($carrello);
    $indice=$cicli-1;
    $totcosto=0;
    while($cicli>0){
    $totcosto=$totcosto+($carrello[$indice]['prezzo']*$carrello[$indice]['quant']);
    $cicli--;
    $indice--;
    }
    if($uova==1){print"<tr bgcolor=#86ae0d class=carrello2><td>Peso totale kg. $peso_car</td><td></td><td>Costi di Spedizione &euro; $sped</td><td>Totale Carrello &euro; $totcosto</td>";



    print "<td>Con Spedizione &euro;".($totcosto+$sped)."</td></tr>";}
    } ?>
    <tr height="26">
    <td colspan="5" width="731" height="26">
    <div align="left">
    [img]cardo.jpg[/img]</div>
    </td>
    </tr>
    </table></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td width="737">
    <div align="center">
    <form id="FormName" action="ordine.php" method="post" name="FormName">
    <div align="right">
    <table width="269" border="0" cellspacing="2" cellpadding="0" align="center" height="38">
    <tr>
    <td>
    <div align="right">
    [img]cancelcarr.jpg[/img] </div>
    </td>
    <td>
    <div align="left">
    <input type="hidden" name="ord" value="si"><input type="image" src="cassa.jpg" alt="" align="top"></div>
    </td>
    </tr>
    </table>
    </div>
    </form>
    </div>
    </td>
    <td></td>
    </tr>
    </table>
    </div>
    </body>

    </html>

  4. #4
    $tabello= mysql_query("SELECT * FROM vetrina WHERE (id =$nuovoid )")or die(mysql_error());

    devi togliere le parentesi dopo where
    cosi

    $tabello= mysql_query("SELECT * FROM vetrina WHERE id=$nuovoid")or die(mysql_error());

    ciao

  5. #5
    Grazie Spyre ci avevo già provato ma non funge lo stesso

    $tabello= mysql_query("SELECT * FROM vetrina WHERE 'id' =$nuovoid ")or die(mysql_error());

    nel nuovo file ma nulla.... tutto uguale.

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.