Note that there are some explanatory texts on larger screens.

plurals
  1. POecho of variables does not work
    primarykey
    data
    text
    <p>Hey guys i have written a short piece of code which connects to a database and then puts some data out with <code>echo</code> but it doesn't work like I want: Edit Updated Code:</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;title&gt;Automatische E-mails&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;?php include("db_login.php"); $link = mysql_connect($host, $user, $pass) or die ("Keine Verbindung zu der Datenbank moeglich."); mysql_select_db($db, $link); $sql = "SELECT `ID_Zuordnung`, `Username`, `Hostname_alt`, `Datum_Ausgabe` FROM `zuordnung` WHERE `Status_Tausch` = 'OK' AND `Status_Altgeraet` = 'NOK' ORDER BY `Hostname_alt` ASC"; $result = mysql_query($sql); while($resultarray = mysql_fetch_array($result)) { echo '&lt;p&gt;'.$resultarray['HW_Typ'].'&lt;/p&gt;'; echo '&lt;p&gt;'.$resultarray['Hostname_alt'].'&lt;/p&gt;'; echo '&lt;p&gt;'.$resultarray['Username'].'&lt;/p&gt;'; echo '&lt;p&gt;'.$resultarray['Emailadresse'].'&lt;/p&gt;'; echo '&lt;p&gt;'.$resultarray['Datum_Ausgabe'].'&lt;/p&gt;'; echo '&lt;p&gt;'.$resultarray['Abteilung'].'&lt;/p&gt;'; } ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Running produced this output:</p> <pre><code>'.$resultarray['HW_Typ'].' '; echo ' '.$resultarray['Hostname_alt'].' '; echo ' '.$resultarray['Username'].' '; echo ' '.$resultarray['Emailadresse'].' '; echo ' '.$resultarray['Datum_Ausgabe'].' '; echo ' '.$resultarray['Abteilung'].' '; } ?&gt; </code></pre> <p>I don't get where is my error is because yesterday everything worked!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload