include mysql query in variabele

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Yannick Bogaert

Yannick Bogaert

10/04/2011 19:59:00
Quote Anchor link
Hallo allemaal,

ik zou beetje hulp voor volgend probleem.

Volgende code zou ik graag integreren in een
$message variabele voor de mail($to,$subject,$message,$headers)
functie.

Natuurlijk staan er buiten dit stukje code ook
nog andere "plain text" in deze $message.

Iemand een idee hoe ik dit kan integreren?

code is:
<php?
include('connect.php');

$datum = date('d/m/y');
$result = mysql_query("SELECT * FROM irregularity WHERE datum='$datum'");

echo "<table border='1'>
<tr>
<th>Flight</th>
<th>Action</th>
<th>Delay</th>
<th>Reason</th>
<th>Remark</th>
</tr>";

while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['flight'] . "</td>";
echo "<td>" . $row['action'] . "</td>";
echo "<td>" . $row['delay'] . "</td>";
echo "<td>" . $row['reason'] . "</td>";
echo "<td>" . $row['remark'] . "</td>";
echo "</tr>";
}
echo "</table>"
?>

Alvast bedankt!
Gewijzigd op 10/04/2011 21:53:26 door Yannick Bogaert
 
PHP hulp

PHP hulp

24/04/2024 16:13:48
 
Sebastiaan Blaas

Sebastiaan Blaas

03/05/2011 14:23:09
Quote Anchor link
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
$bla
= "<table border='1'>
<tr>
<th>Flight</th>
<th>Action</th>
<th>Delay</th>
<th>Reason</th>
<th>Remark</th>
</tr>"
;

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

$bla .= "<tr>";
$bla .= "<td>" . $row['flight'] . "</td>";
$bla .= "<td>" . $row['action'] . "</td>";
$bla .= "<td>" . $row['delay'] . "</td>";
$bla .= "<td>" . $row['reason'] . "</td>";
$bla .= "<td>" . $row['remark'] . "</td>";
$bla .= "</tr>";
}

$bla .= "</table>"
?>
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.