Passaggio di variabili con register_globals = 0FF

Salve io sto ristrutturando un sito con back-office, vorrei sapere come si passano le variabili da una pagina all'altra e su un Pop-up?

Vi sarei lieti se mi potete dare una mano.

Vi posto un esempio:

<? include "condb.php";

$selnew =  "select * from novita where idnew <> '0'  and newhome = 'si' order by rand() limit 1";

$querynew = mysql_query ($selnew,$connessione)

                or die ("<span class='red'>Non riesco ad eseguire la richiesta, torna indietro</span>");

?>

<html>

<head>

<meta name="keywords" content="videoteca, dvd, vhs, film, video, videoteca, home, hometheatre, videocassette, cooming soon, anteprima, programmazione, Cave, Via Pio XII,">

<meta name="description" content="Videoteca Fiorella, noleggio e acquisto di dvd e videocassette Cave">

<meta name="author" content="sito realizzato da SalvioniA Cave - www.asalvioni.net">

<title>Sito Videoteca</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<link href="style_AS.css" rel="stylesheet" type="text/css">

<body>

<table align="center" border="0">

   <tr>

      <td align="center" class="newstitle">Novità</td>

   </tr>

</table>

<?

  $valnew = mysql_fetch_array ($querynew);

   $idnew = $valnew ["idnew"];

   $titolo  = $valnew ["titolo"];

   $genere  = $valnew ["genere"];

   $foto    = $valnew ["foto"];

?>

<div align="center">

   <table border="0">

   <tr>

                <? if ($foto) { ?>

      <td width="145" valign="top">

         <a href="#" onclick="SelezScheda=window.open('scheda_mixed.php?selezscheda=<? echo $idnew ?>','SelezScheda','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=720,height=600'); return false;"><img border="0" src="./areariservata/<? echo $foto ?>" alt="<? echo $titolo ?>"></a>

      </td>

   </tr>

   <tr>

      <td align="center" class="new"><? echo $titolo ?></td>

        </tr>

        <tr>

      <td align="center" class="new"><? echo $genere ?></td>

        </tr>

      <? } ?>

   </table>

</div>

<? 

mysql_close ($connessione);

?>

</body>

</html>

  :bye:

 

inviato 10 anni fa
EKELON77
X 0 X

Ho risolto gran parte dei problemi con la variabile $_GET, ma quando navigo nel Back-Office e tento di fare una modifica non riesce ad eseguire la query.

Io ho un radio button che si chiama con il nome 'idvid' che ha il valore '<?= $idvideo ?>' che identifica il numero del id che ha ogni singolo titolo.

<?

include "sessione.php";

function refresh($url,$t)

{

 echo "<META HTTP-EQUIV=REFRESH CONTENT=\"$t;  URL=$url\">";

}

?>

<html>

<head>

<title>Modifica titolo nell'Archivio</title>

<script language="JavaScript">

function Controllo() {

title      = document.mod.title.value;

title2     = document.mod.title.value.length;

img       = document.mod.immagine.value;

pos       = img.lastIndexOf(".");

img_esten = img.substr(pos+1);

//verif_exp = /^[A-Za-z0-9]+[A-Za-z-\'àèéìòù. ]*$/;

//verif_exp2 = /^([a-zA-Z0-9])+$/;

if (title2 < 2) {

    alert("Inserire il nome del titolo in modo corretto!");

   document.mod.title.focus();

   return false

}

else if ((img != "") && (img_esten!="jpg") && (img_esten!="jpeg") && (img_esten!="swf") && (img_esten!="gif") && (img_esten!="png")) {

        alert ("Il logo dell'evento deve essere un files jpg o jpeg o gif o png");

        document.mod.immagine.focus()

      return false

}

else {

      document.mod.method="post"

     document.mod.action="upvideo.php?img="+img

     }

return true

}

function Linka()

{

risp=window.prompt('Inserisci il link')

if (risp==null || risp=="")

   {

   return

   }

target = "_blank"

if (risp.indexOf("www")!="-1")

   mTag="A HREF='http://"+risp+"' target='"+target+"'"

else

   {

   mTag="A HREF='"+risp+"' target='"+target+"'"

   }

mTag2="A"

mTagC= '</'+mTag2+'>'

mTagA= '<'+mTag+'>'

 if (document.selection)

      {

      range = document.selection.createRange()

      if (range.text!='' && mTagC!='' ||range.text=='' && mTagC=='')

         {

         range.text=mTagA+range.text+mTagC;

         //document.mod.descrizione.focus()

         }

      }

   else

      {

      txt=mTagA+mTagC;

      document.forms[0].trama.value = document.forms[0].trama.value+txt.replace(new RegExp('([\\f\\n\\r\\t\\v ])+', 'g')," ");

      //document.mod.descrizione.focus()

      }

}

function pulsante(mTag)

{

if (mTag!="")

   {

   if (mTag=="br")

      {

      mTagC=''

      }

   else

      {

      mTagC= '</'+mTag+'>'

      }

   mTagA= '<'+mTag+'>'

   if (document.selection)

      {

      range = document.selection.createRange()

      if (range.text!='' && mTagC!='' ||range.text=='' && mTagC=='')

         {

         range.text=mTagA+range.text+mTagC;

         //document.mod.descrizione.focus()

         }

      }

   else

      {

      txt=mTagA+mTagC;

      document.forms[0].trama.value = document.forms[0].trama.value+txt.replace(new RegExp('([\\f\\n\\r\\t\\v ])+', 'g')," ");

      //document.mod.descrizione.focus()

      }

   }

}

function Maiusc(field) {

      field.value = field.value.toUpperCase()

}

/*function Colore(color)

{

mTagC= '</font>'

mTagA= "<font color='" +color+ "'>"

if (document.selection)

      {

      range = document.selection.createRange()

      if (range.text!='' && mTagC!='' ||range.text=='' && mTagC=='')

         {range.text=mTagA+range.text+mTagC;

         document.mod.color.options[0].selected="true"

         //document.mod.descrizione.focus()

         }

      }

   else

      {

      txt=mTagA+mTagC;

      document.forms[0].descrizione.value = document.forms[0].descrizione.value+txt.replace(new RegExp('([\\f\\n\\r\\t\\v ])+', 'g')," ");

      document.mod.color.options[0].selected="true"

      //document.mod.descrizione.focus()

      }

}*/

function legenda()

{

  eval("aa=window.open('legenda.htm','Legenda','width=650, height=310')")

}

</script>

</head>

<link rel="stylesheet" href="stile.css" type="text/css">

<body bgcolor="#ffffff" text="#000000">

<?

if (($nominat != '') and ($cd=="6a4c2e0g1")){

include "connessione.php";

$idvid = $_POST['idvid'];

$selvideo =  "select * from video where idvideo = $idvid";

$queryvideo = mysql_query ($selvideo,$connes)

                or die ("Non riesco ad eseguire la richiesta, torna indietro");

$valvideo = mysql_fetch_array ($queryvideo);

$idvideo    = $valvideo ["idvideo"];

$titolo      = $valvideo ["titolo"];

$genere      = $valvideo ["genere"];

$trama      = $valvideo ["trama"];

$foto = $valvideo ["foto"];

$regia = $valvideo ["regia"];

$produz = $valvideo ["produz"];

$naz = $valvideo ["naz"];

$anno = $valvideo ["anno"];

$durata = $valvideo ["durata"];

$eta = $valvideo ["eta"];

$suppdvd = $valvideo ["supportodvd"];

$suppvhs = $valvideo ["supportovhs"];

$cast1 = $valvideo ["cast1"];

$cast2 = $valvideo ["cast2"];

$cast3 = $valvideo ["cast3"];

$cast4 = $valvideo ["cast4"];

$cast5 = $valvideo ["cast5"];

$cast6 = $valvideo ["cast6"];

$sottotitle = $valvideo ["sottotitoli"];

?>

<table width="630" border="0" cellspacing="0" cellpadding="0">

  <tr>

    <td width="366" align="left" valign="middle"><a  href="../index.php" target="_blank"><img src="./images/logo.gif" border="0"></a></td>

    <td width="104" align="right" valign="middle" class="newstit">Vai al<br><br>Ritorna a </td>

    <td width="160" align="left" valign="middle" class="newstit"> &nbsp;<a href="../index.php" target="_blank" class= "avantindietro2">Sito

      online</a><br><br>&nbsp;<a href="./gestarchivio.php" class= "avantindietro2">Gestione Archivio</a></td>

  </tr>

  <tr>

    <td colspan="3">&nbsp;</td>

  </tr>

  <tr align="center">

    <td height="24" colspan="3" valign="middle"  bgcolor="#FFFFFF" class="newstit">

      <i><b><font face="Verdana">&nbsp; </font></b></i>Back - Office:&nbsp;<font color="#6699FF">Archivio</font></td>

  </tr>

  <tr>

    <td colspan="3">&nbsp;</td>

  </tr>

  <tr valign="middle">

    <td height="30" colspan="3" align="center" valign="middle" bgcolor="#FFFFFF" class="newstit">Tramite quest'interfaccia hai la possibilit&agrave; di modificare i film in Archivio.</td>

 </tr>

  <tr>

    <td colspan="3">&nbsp;</td>

  </tr>

  <tr>

    <td colspan="3" bgcolor="#6699FF" align="middle"><IMG height=1 src="./images/px_trasp.gif" width=1></td>

  </tr>

</table>

<p></p>

<form name="mod" onsubmit="return Controllo()" encType="multipart/form-data">

<input type="hidden" name="idvideo" value="<? echo $idvideo ?>">

<input type="hidden" name="fotoold" value="<? echo $foto ?>">

<!--input type= "hidden" name= "page" value= "<? // echo $page ?>"-->

  <table width="630" bgColor=#CADBFF border="0" cellspacing="0" cellpadding="0">

    <tr>

      <td width="40" height="40" bgColor=#ffffff>&nbsp;</td>

      <td width="590" height=40 colspan="2" align ="center" valign="middle" bgcolor= #F0F3F4 class="newstit2">Modifica

        il Titolo</td>

    </tr>

    <tr height=40>

      <td height="40" bgColor=#ffffff>&nbsp;</td>

      <td height="40" colspan="3" align="center" valign="middle" bgcolor="#F0F3F4"><input type="button" name="leg" value="Legenda" onClick="javascript:legenda()" class="button"></td>

    </tr>

    <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Nome Titolo:</td>

      <td height="60" align="left" valign="middle">&nbsp; <input name= "title" type= "text" class= "newssin" value="<? echo $titolo ?>" size=40 maxlength="70" onchange="Maiusc(this)">

      </td>

    </tr>

       <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Genere:</td>

      <td height="60" align="left" valign="middle">&nbsp; <input name= "genere" type= "text" class= "newssin" value="<? echo $genere ?>" size=40 maxlength="70" onchange="Maiusc(this)">

      </td>

    </tr>

    <tr height=40>

      <td height="40" bgColor=#ffffff>&nbsp;</td>

      <td height="40" align="right" class="newstit">Stile del testo:</td>

      <td height="40" align="left" valign="middle">&nbsp; <input type="button" name="BR" value="BR" onClick="pulsante('BR')" class="button">

        <input type="button" name="Grassetto" value="G" onClick="pulsante('B')" class="button">

        <input type="button" name="Corsivo" value="C" onClick="pulsante('I')" class="button">

        <input type="button" name="Sottolineato" value="S" onClick="pulsante('U')" class="button">

        <input type="button" name="Link" value="Link" onClick="Linka()" class="button">

        &nbsp; <!--SELECT size="1" name="color" onchange="Colore(this.value)" class= "newssin">

          <OPTION value="" selected>COLORI DEL SITO</OPTION>

          <OPTION value="#FF9900" style="color:#FF9900">Arancione</OPTION>

          <OPTION value="#FFFFFF"                      >Bianco</OPTION>

          <OPTION value="#458EED" style="color:#458EED">Blu Chiaro</OPTION>

          <OPTION value="#999999" style="color:#999999">Grigio</OPTION>

          <OPTION value="#DF0000" style="color:#DF0000">Rosso Scuro</OPTION>

          <OPTION value="#33CC00" style="color:#33CC00">Verde Chiaro</OPTION>

          <OPTION value="#8AB141" style="color:#8AB141">Verde Scuro</OPTION>

          <OPTION value=""> - - - - - - </OPTION>

          <OPTION value="#0000FF" style="color:#0000FF">Blu</OPTION>

          <OPTION value="#000099" style="color:#000099">Blu Scuro</OPTION>

          <OPTION value="#FFFF00" style="color:#FFFF00">Giallo</OPTION>

          <OPTION value="#000000" style="color:#000000">Nero</OPTION>

          <OPTION value="#FF0000" style="color:#FF0000">Rosso</OPTION>

          <OPTION value="#9900FF" style="color:#9900FF">Viola</OPTION>

          <OPTION value="#CCCCCC" style="color:#CCCCCC">Grigio 50%</OPTION>

          <OPTION value="#00FFFF" style="color:#00FFFF">Turchese</OPTION>

        </SELECT--> </td>

    </tr>

    <tr height=40>

      <td height="40" bgColor=#ffffff>&nbsp;</td>

      <td height="150" align="right" valign="middle" class="newstit">Trama:</td>

      <td height="150" align="left" valign="middle">&nbsp; <textarea name="trama" cols="40" class= "newssin" rows="8" id="trama" onchange="Maiusc(this)"><? echo $trama ?></textarea>

      </td>

    </tr>

    <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Regia:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="regia" value="<? echo $regia ?>" type="text" class= "newssin" size=40 maxlength="120" onchange="Maiusc(this)"></td>

   </tr>

   <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Produzione:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="produz" value="<? $produz ?>" type="text" class= "newssin" size=40 maxlength="120" onchange="Maiusc(this)"></td>

    </tr>

   <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Nazionalità:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="nazio" value="<? echo $naz ?>" type="text" class= "newssin" size=40 maxlength="40" onchange="Maiusc(this)"></td>

    </tr>

    <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Anno:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="anno" value="<? echo $anno ?>" type="text" class= "newssin" size=5 maxlength="4" onchange="Maiusc(this)"></td>

    </tr>

    <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Durata:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="durata" value="<? echo $durata ?>" type="text" class= "newssin" size=5 maxlength="4" onchange="Maiusc(this)"></td>

    </tr>

   <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Età:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="eta" value="<? echo $eta ?>" type="text" class= "newssin" size=5 maxlength="4" onchange="Maiusc(this)"></td>

    </tr>

   <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Cast 1:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="cast1" value="<? echo $cast1 ?>" type="text" class= "newssin" size=40 maxlength="120" onchange="Maiusc(this)"></td>

    </tr>

   <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Cast 2:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="cast2" value="<? echo $cast2 ?>" type="text" class= "newssin" size=40 maxlength="120" onchange="Maiusc(this)"></td>

    </tr>

      <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Cast 3:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="cast3" type="text" value="<? echo $cast3 ?>" class= "newssin" size=40 maxlength="120" onchange="Maiusc(this)"></td>

    </tr>

   <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Cast 4:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="cast4" value="<? echo $cast4 ?>" type="text" class= "newssin" size=40 maxlength="120" onchange="Maiusc(this)"></td>

    </tr>

   <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Cast 5:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="cast5" value="<? echo $cast5 ?>" type="text" class= "newssin" size=40 maxlength="120" onchange="Maiusc(this)"></td>

    </tr>

   <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Cast 6:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="cast6" value="<? echo $cast6 ?>" type="text" class= "newssin" size=40 maxlength="120" onchange="Maiusc(this)"></td>

    </tr>

    <tr height=60>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Sottotitoli:</td>

      <td height="20" align="left" valign="middle">&nbsp; <input name="sotto" value="<? echo $sottotitle ?>" type="text" class= "newssin" size=60 maxlength="120" onchange="Maiusc(this)"></td>

    </tr>

    <tr height=40>

      <td height="40" bgColor=#ffffff>&nbsp;</td>

      <td height="40" align="right" valign="middle" class="newstit">Nuova Locandina:</td>

      <td height="40" align="left" valign="middle">&nbsp; <input name="immagine" type="file" class="newssin" size="40"></td>

    </tr>

    <? if ($foto) { ?>

    <tr>

      <td height="60" bgColor=#ffffff>&nbsp;</td>

      <td height="60" align="right" valign="middle" class="newstit">Locandina:</td>

      <td height="60" align="left" valign="middle">&nbsp;&nbsp; <img src="<? echo $foto ?>" border="0" align="center"></td>

    </tr>

    <tr height="40">

      <td height="40" bgColor=#ffffff>&nbsp;</td>

      <td height="40" align="right" valign="middle" class="newstit">Vuoi eliminare la locandina? :</td>

      <td height="40" valign="middle" class="newstit">&nbsp;

        <INPUT TYPE="RADIO" TABINDEX=3 NAME="delimg" VALUE="Si">SI &nbsp;

        <INPUT TYPE="RADIO" TABINDEX=3 NAME="delimg" VALUE="No" CHECKED>NO

      </td>

    </tr>

    <? } ?>

    <tr height=40>

      <td bgColor=#ffffff>&nbsp;</td>

      <td align="right" valign="middle" class="newstit" title="Attiva o Disattiva il Supporto">

        Supporto DVD? :</td>

      <td height="40" valign="middle" class="newstit">&nbsp;

        <? if ($suppdvd == 'No') { ?>

        <INPUT TYPE="RADIO" TABINDEX=3 NAME="suppdvd" VALUE="Si">

        SI &nbsp; <INPUT TYPE="RADIO" TABINDEX=3 NAME="suppdvd" VALUE="No" CHECKED>

        NO

        <? } else { ?>

        <INPUT TYPE="RADIO" TABINDEX=3 NAME="suppdvd" VALUE="Si" CHECKED>

        SI &nbsp; <INPUT TYPE="RADIO" TABINDEX=3 NAME="suppdvd" VALUE="No">

        NO

        <? } ?>

      </td>

    </tr>

    <tr height=40>

      <td bgColor=#ffffff>&nbsp;</td>

      <td align="right" valign="middle" class="newstit" title="Attiva o Disattiva il Supporto">

      Supporto VHS? :</td>

      <td height="40" valign="middle" class="newstit">&nbsp;

        <? if ($suppvhs == 'No') { ?>

        <INPUT TYPE="RADIO" TABINDEX=3 NAME="suppvhs" VALUE="Si">

        SI &nbsp; <INPUT TYPE="RADIO" TABINDEX=3 NAME="suppvhs" VALUE="No" CHECKED>

        NO

        <? } else { ?>

        <INPUT TYPE="RADIO" TABINDEX=3 NAME="suppvhs" VALUE="Si" CHECKED>

        SI &nbsp; <INPUT TYPE="RADIO" TABINDEX=3 NAME="suppvhs" VALUE="No">

        NO

        <? } ?>

      </td>

    </tr>

    <tr height=35>

      <td bgColor=#ffffff>&nbsp;</td>

      <td height="40" colspan="2" align="center" valign="middle" bgcolor="#F0F3F4">

        <input type="image" src="./images/pul_modifica.gif" name="mod"> </td>

    </tr>

  </table>

</form>

<?

mysql_close ($connes);

} else {

$msg = "ACCESSO NEGATO";

refresh("accesso.php?msg=$msg",0);

exit;

}

?>

</body>

</html>
risposto 10 anni fa
EKELON77
X 0 X

Semmai prova a mettere le variabili in sessione

risposto 10 anni fa
infinytech
X 0 X
Effettua l'accesso o registrati per rispondere a questa domanda