Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Piekne kszaczki
topik53
post
Post #1





Grupa: Zarejestrowani
Postów: 107
Pomógł: 1
Dołączył: 3.06.2010

Ostrzeżenie: (0%)
-----


  1. <?php
  2.  
  3. require('conn.php');
  4.  
  5. if (isset($_POST['title']) and isset($_POST['tresc']) )
  6. {
  7.  
  8. $title = $_POST['title'];
  9. $tresc = $_POST['tresc'];
  10.  
  11. $zapytanie="INSERT INTO notki (title,tresc,adder) VALUES('$title','$tresc','ghost')";
  12.  
  13. mysql_query($zapytanie) or die("Wystpi bd" );
  14. $zapytanie2="Select max(id) from notki";
  15. $idzapytania2 = mysql_query($zapytanie2) or die(mysql_error());
  16. while($wiersz = mysql_fetch_row($idzapytania2)){
  17.  
  18. $id = $wiersz[0];
  19.  
  20.  
  21. }
  22. echo '
  23. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25.  
  26. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  27. <title>WebNot</title>
  28. <link rel="stylesheet" type="text/css" href="style.css" />
  29. </head>
  30.  
  31. Notka zostaa dodana
  32. </body>
  33.  
  34. </html>
  35. ';
  36.  
  37.  
  38. }
  39.  
  40. else{
  41.  
  42. ?>
  43.  
  44.  
  45. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  46. "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  47. <html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
  48.  
  49.  
  50.  
  51. <meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
  52.  
  53.  
  54. <title>WebNot</title>
  55. <link rel="stylesheet" type="text/css" href="style.css" />
  56. </head>
  57.  
  58. <h1>Dodaj notke</h1>
  59.  
  60. <form action="add.php" method="POST">
  61.  
  62. <strong>Tytul:</strong><br />
  63. <textarea name="title" type="text" id="input_one" cols="100" rows="1" ></textarea> <br />
  64.  
  65. <strong>Tresc::</strong><br />
  66. <textarea name="tresc" type="text" cols="100" rows="20" id="input_two"></textarea> <br />
  67. <input type="submit" value="Wyslij Notatke" />
  68. <br />
  69.  
  70.  
  71. </form>
  72. <img src="http://www.darmowe-liczniki.web-tools.pl/licznik-68-61355-stat.png"/>
  73. </body>
  74.  
  75. </html>
  76.  
  77. <?php
  78.  
  79. }
  80.  
  81.  
  82. ?>

Co zrobić żeby nie kszaczkowalo mi ?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 16:05