Rigtigt, men med denne kode;
- <body>
- <?
- session_start();
- include("config.php");
- $vis = array();
-
- if (isset($_SESSION["brugernavn"],$_SESSION["kodeord"])) {
-
- $hent = mysql_query("SELECT * FROM soc_bruger WHERE brugernavn = '".$_SESSION['brugernavn']."'") or die(mysql_error());
-
- $vis = mysql_fetch_array($hent);
-
- }
-
- ?>
- <?php if ($_POST[action] == "update")
- { $emne = ($_POST[emne]);
- $fra = ($_POST[fra]);
- $besked = ($_POST[besked]);
- $sql = "INSERT INTO vb_tagwall (fra,emne,date,besked) VALUES ('".$fra."','".$emne."',NOW(),'".$besked."')";
- mysql_query($sql) or die (mysql_error());}?>
- <form action="" method=post>
- <p>
- <input type="hidden" name="action" value="update">
- </p>
- <p><FONT face=tahoma size=2><a href='tagwall.php'>Opdater</a> <br>
- <br>
- </FONT>
-
- <script type="text/javascript">
- function indsaet(smiley){ document.getElementById("msg").value = document.getElementById("msg").value + smiley; document.getElementById("msg").focus();}</script>
- <input type="text" name="fra" onfocus="if(this.value=='Navn')this.value='';" onblur="if(this.value=='')this.value='Navn';" value="Navn" size="20" maxlength="50" style="width: 350" />
- <br>
- <br>
- <textarea style="width: 350;height: 100px" id="msg" name="besked" cols="45" rows="8"></textarea>
- <br>
- <input align="right" name="update" type="submit" value="Skriv" style="height: 20;width: 350" />
- <br>
- <br>
- <FONT face=tahoma size=2>Beskeder:</font><br>
- <? $res_tagwall = mysql_query("SELECT * FROM vb_tagwall order by id DESC"); while ($row_tagwall = mysql_fetch_array($res_tagwall)){?>
- <font face="tahoma" size="2">
- </p>
- <hr width=100% style="height: 1;margin:0px 0px 5px 0px;background-color: blue;color: blue">
- <?=$row_tagwall[emne]?>
- <?=$row_tagwall[fra]?><br>
- <font size=1><?=$row_tagwall[date]?> <?=$row_tagwall[id]?></font><br></b><?=$row_tagwall[besked]?></font>
- <? } ?>
Får jeg nu denne fejl:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at E:\hjemmesider\codemorten\frihtml.tii.dk\loglog\bruger\tagwall\tagwall.php:2) in E:\hjemmesider\codemorten\frihtml.tii.dk\loglog\bruger\tagwall\tagwall.php on line 3