Visualizzazione dei risultati da 1 a 2 su 2

Discussione: modulo con HTTPS

  1. #1
    Utente di HTML.it L'avatar di renzoz
    Registrato dal
    May 2001
    Messaggi
    305

    modulo con HTTPS

    Sto uscendo pazzo, ho questi 2 script che, se non implemento il protocollo https funzionano normalmente ma appena faccio puntare ad https.. sembra che le $_POST[] non vengano inviate:

    offerta.php
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Richiesta offerta</title>
    </head>
    <body>
    <?php
    include("inc/config.php");
    $qct = "SELECT prodottix.nome, prodottix.descrizione FROM prodottix WHERE idp='$_GET[art]'";
    $rct = mysql_query($qct, $db);
    $act = mysql_fetch_array($rct);
    ?>
    <form action="https://www.miodomino.it/offertaok.php" method="post" name="richiesta">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr><td style="font-family:tahoma; font-size:12px; color:#FFFFFF; background-color:#C42435; font-weight:bold;">Titolo</td></tr>
    <tr><td>

    <table cellpadding="2" cellspacing="0" border="0">
    <tr>
    <td class="t12l" valign="top"><?php echo"$act[nome]"; ?></td>
    <td rowspan="2" valign="top">[img]foto/<?php echo[/img]" width="100" height="78" class="im"></td>
    </tr>
    <tr>
    <td class="t12l" valign="top"><?php echo"$act[descrizione]"; ?></td>
    </tr></table>
    </td></tr>
    <tr><td class="t12l" style="text-align:center;">

    Seleziona gli articoli che ti interessano inserendo la quantità richiesta:

    <table cellpadding="2" cellspacing="0" style="border-color:#999999; border-width:1px; border-style:solid; border-collapse:collapse;">
    <tr><td class="t12l" style="width:100px; background-color:#F0F0F0; color:#C42435;">CODICE</td>
    <td class="t12l" style="width:300px; background-color:#F0F0F0; color:#C42435;">DESCRIZIONE</td>
    <td class="t12l" style="width:50px; text-align:right; background-color:#F0F0F0; color:#C42435;">EURO</td>
    <td class="t12l" style="width:50px; text-align:right; background-color:#F0F0F0; color:#C42435;">QUANTITÀ</td></tr>
    <?php
    $qcp = "SELECT idc, codice, descrizione, prezzo, promo FROM codicix WHERE idprodotto='$_GET[art]' ORDER BY idc ASC";
    $rcp = mysql_query($qcp, $db);
    while($acp = mysql_fetch_array($rcp))
    {
    if($acp[prezzo] != "0.00")
    {
    $price = number_format($acp[prezzo], 2, ',', '.');
    }
    else
    {$price = "-"; }

    if($acp[promo] == "1")
    {
    $classe = "t11p";
    $pr = "<img src=\"imgs/promo.gif\" width=\"38\" height=\"11\" border=\"0\">
    ";
    }
    else
    {
    $classe = "t11j";
    $pr = "";
    }
    echo"<input type=\"hidden\" name=\"cod[]\" value=\"$acp[codice]\">\n";
    echo"<input type=\"hidden\" name=\"descr[]\" value=\"$acp[descrizione]\">\n";
    echo"<input type=\"hidden\" name=\"prezzo[]\" value=\"$price\">\n";

    print("<tr><td class=\"$classe\" style=\"border-color:#999999; border-width:1px; border-style:solid;\">[b]$acp[codice][b]</td>".
    "<td class=\"$classe\" style=\"border-color:#999999; border-width:1px; border-style:solid;\">$pr $acp[descrizione]</td>".
    "<td class=\"$classe\" style=\"border-color:#999999; border-width:1px; border-style:solid; text-align:right;\">$price</td>".
    "<td class=\"$classe\" style=\"border-color:#999999; border-width:1px; border-style:solid; text-align:center;\"><input type=\"text\" name=\"qta[]\" size=\"3\"></td></tr>\n");
    }
    mysql_close($db);
    ?>
    </table>
    </td></tr>
    <tr><td class="t12l" style="text-align:center;">
    Inserisci i tuoi dati:

    <table cellpadding="2" cellspacing="0" border="0" style="border-width:1px; border-color:#999999; border-style:solid;">
    <tr><td class="t12l">Data di consegna
    gg/mm/aaaa </td><td class="t12l"><input type="text" name="data" size="10" /></td></tr>
    <tr><td class="t12l">Nome e Cognome</td><td class="t12l"><input type="text" name="nome" size="40" /></td></tr>
    <tr><td class="t12l">Ragione Sociale</td><td class="t12l"><input type="text" name="rs" size="40" /></td></tr>
    <tr><td class="t12l">Indirizzo</td><td class="t12l"><input type="text" name="ind" size="40" /></td></tr>
    <tr><td class="t12l">Città</td><td class="t12l"><input type="text" name="city" size="40" /></td></tr>
    <tr><td class="t12l">C.A.P.</td><td class="t12l"><input type="text" name="cap" size="6" /></td></tr>
    <tr><td class="t12l">Telefono</td><td class="t12l"><input type="text" name="tel" size="20" /></td></tr>
    <tr><td class="t12l">Email</td><td class="t12l"><input type="text" name="email" size="40" /></td></tr>
    </table>
    </td></tr>
    <tr><td style="text-align:center;">

    <input type="submit" value="INVIA RICHIESTA" style="font-family:tahoma; color:#000000; font-size:12px; background-color:#F7F7F7;"></td></tr>
    </td></tr>
    </table>
    </form>
    </body>
    </html>
    offerta.php
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Richiesta offerta</title>
    </head>
    <body>
    <?php print_r($_POST);

    for($j=0; $j < 10; $j++)
    {
    $codici[$j] = $_POST['cod'][$j];
    $descrizioni[$j] = $_POST['descr'][$j];
    $prezzi[$j] = $_POST['prezzo'][$j];
    $qta[$j] = $_POST['qta'][$j];
    }

    $data = date("d-m-Y");
    $ora = date("H:i:s");

    $messaggio = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
    <html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"><title>Richiesta offerta</title>
    </head><body><table cellpadding=\"0\" cellspacing=\"5\" border=\"0\" width=\"100%\">
    <tr><td style=\"font-family:tahoma, arial, verdana; font-size:12px; color:#000000;\">
    <u>Nominativo richiedente:</u>

    Nome: ".$_POST[nome]."

    Ragione sociale: ".$_POST[rs]."

    Indirizzo: ".$_POST[ind]."

    Città: ".$_POST[city]."

    C.A.P.: ".$_POST[cap]."

    Telefono: ".$_POST[tel]."
    ";

    $messaggio .= "</td><td style=\"font-family:tahoma, arial, verdana; font-size:12px; color:#000000;\">DATA: $data
    ORA: $ora</td></tr>
    <tr><td colspan=\"2\"><hr></td></tr>
    <tr><td colspan=\"2\" style=\"text-align:left; font-family:tahoma, arial, verdana; font-size:14px; color:#000000;\">
    Data di consegna: ".$_POST[data]."</td></tr>
    <tr><td colspan=\"2\" style=\"text-align:left; font-family:tahoma, arial, verdana; font-size:14px; color:#000000;\">
    <table cellpadding=\"3\" cellspacing=\"0\" border=\"1\">
    <tr style=\"font-family:tahoma, arial; font-size:12px;\"><td>Codice</td><td>Descrizione</td><td>Prezzo</td><td>Quantità</td></tr>";
    while(list($k, $val) = each($qta))
    {
    if($qta[$k] != "")
    { $messaggio .= "<tr style=\"font-family:tahoma, arial; font-size:12px;\"><td>$codici[$k]</td><td>$descrizioni[$k]</td><td>$prezzi[$k]</td><td>$qta[$k]</td></tr>"; }
    }
    $messaggio .= "</table></td></tr></table></body></html>";


    $dest = "info@miodominio.it";
    $oggetto = "Richiesta offerta";

    $intestazioni = "From: $_POST[email]\n";
    $intestazioni .= "X-Mailer: Sismail Web Email Interface\n";
    $intestazioni .= "Content-Type: text/html\n" ;
    $intestazioni .= "X-Priority: 3\n";
    $intestazioni .= "MIME-version: 1.0\n";
    $invio = mail("$dest","$oggetto","$messaggio","$intestazion i");
    if($invio) { echo"<p class=\"t12c\">



    La vostra richiesta è stata inoltrata, vi risponderemo appena possibile, grazie.



    <a style=\"font-family:verdana; font-size:10px; color:#C42435; text-decoration:none; font-weight:bold;\" href=\"javascript:window.close()\">CHIUDI QUESTA FINESTRA</a></p>";}
    else
    { echo"<p class=\"t12c\">



    Si è verificato un errore nella trasmissione dei dati, riprova più tardi grazie.



    <a style=\"font-family:verdana; font-size:10px; color:#C42435; text-decoration:none; font-weight:bold;\" href=\"javascript:window.close()\">CHIUDI QUESTA FINESTRA</a></p>";}

    ?>
    </body>
    </html>
    Infatti la stampa dell'array $_POST mi restituisce Arra()... dove sbaglio??

  2. #2
    Utente di HTML.it L'avatar di renzoz
    Registrato dal
    May 2001
    Messaggi
    305
    up

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.