0

私が気付いていない他のより良い方法があると確信しています-最も単純なアプローチをとろうとしているだけです。必要に応じて追加のコードを投稿します。

前のページからの選択 php 結果:

                <div id="stage1sat" class="stageBox">
    <h3>STAGE 1</h3>
    <table>
    <?php

    ob_start();
    if ( ! empty($_POST['id']))
    { foreach($_POST['id'] as $key => $id) { $_POST['id'][$key] = mysql_real_escape_string($_POST['id'][$key]); } 
    $in = implode(', ', $_POST['id']); 
    $sqlSAT1 = "SELECT * FROM bandSched WHERE day='saturday' AND stage='stage 1' AND id IN ($in) ORDER BY FIELD(id, $in)"; 

    $result = mysql_query($sqlSAT1) or die('MySQL Error ' . mysql_errno() . ': ' . mysql_error()); 
    }
    if ( ! isset($result))
    {
    echo 'You did not select anything';
    }
    else
    {


    while ($row=mysql_fetch_assoc($result))
    {   

    echo "<tr>";
    echo "<td>". $row['timeShow'] ."</td><td>" . $row['bandName'] . "</td>";
    echo "</tr>";
    }

    }

    ?>
    </table> 
    </div>

EmailProcess.php

      <?php

    $to = $_POST["email"];
    $subject = "FPSF SCHEDULE";
    $message = ob_get_clean();
    $headers = "From: The Server <server@doe.com>" . "\r\n" .
               "Content-type: text/html" . "\r\n";

    mail($to, $subject, $message, $headers);

  ?>
4

2 に答える 2

1

これらの php ファイルの結果を と でラップできob_start()ます$message = ob_get_clean()

または、これらの php を変更して、結果を変数に書き込むようにします (echoそれらを ing する代わりに)。

于 2012-05-20T20:45:56.537 に答える
0

Not sure on your problem.. Even while reading through the comments. If you have access to the php ini file or the ability to Turn settings on turn output buffering on.

于 2012-05-21T02:09:30.430 に答える