Language: HtmlPhp
No Title
<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
February 08, 2010 @ 12:11pm
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

