New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: HtmlPhp

No Title

10 Views
Copy Code Show/Hide Line Numbers
<html>
<body>
 
<form action="notisblokk.php" method="get">
Tekst: <br><input type="tekst" name="text" />
 
<input type="submit" name="lagre"/>
</form>
 
 
 
<?php
if ($_GET["tekst"]==null){
    }
else{
 
text=$_GET["tekst"];
 
 
$con = mysql_connect("server","brukernavn","passord");
 
mysql_select_db("notisblokk", $con);
 
mysql_query("INSERT INTO notisblokk (tekst)
VALUES ('text')");
 
mysql_close($con);
 
?>
 
<br>Tidligere innlegg:<br><br>
 
<?php
 
$con = mysql_connect("server","brukernavn","passord");
 
mysql_select_db("notisblokk", $con);
 
$result = mysql_query("SELECT * FROM notisblokk");
 
while($row = mysql_fetch_array($result))
  {
  echo $row['tekst'];
  echo "<br />";
  }
 
mysql_close($con);
 
?>
 
</body>
</html>
by
  February 08, 2010 @ 12:11pm

Add a comment


Report Abuse
brought to you by:
West Wind Techologies


If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate