Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Wyswietlanie Html w PHP
Forum PHP.pl > Forum > PHP
topik53
Witam, mam pewien problem
  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("Wystąpił błąd" );
  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. <head>
  27. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  28. <title>WebNot</title>
  29. <link rel="stylesheet" type="text/css" href="style.css" />
  30. </head>
  31.  
  32. <body>
  33. Notka została dodana
  34. </body>
  35.  
  36. </html>
  37. }
  38.  
  39.  
  40. }
  41.  
  42. else{
  43.  
  44. ?>
  45.  
  46. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  47. <html xmlns="http://www.w3.org/1999/xhtml">
  48.  
  49. <head>
  50. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  51. <title>WebNot</title>
  52. <link rel="stylesheet" type="text/css" href="style.css" />
  53. </head>
  54.  
  55. <body>
  56. <h1>Dodaj notke</h1>
  57.  
  58. <form action="add.php" method="POST">
  59.  
  60. <strong>Tytul:</strong><br />
  61. <textarea name="title" type="text" id="input_one" cols="100" rows="1" ></textarea> <br />
  62.  
  63. <strong>Tresc::</strong><br />
  64. <textarea name="tresc" type="text" cols="100" rows="20" id="input_two"></textarea> <br />
  65.  
  66. <input type="submit" value="Wyslij Notatke" />
  67. <br />
  68.  
  69. <img src="http://www.darmowe-liczniki.web-tools.pl/licznik-68-61355-stat.png"/>
  70. </form>
  71. </body>
  72.  
  73. </html>
  74.  
  75.  
  76.  
  77. <?php
  78.  
  79. }
  80.  
  81.  
  82. ?>
  83.  
  84.  
  85.  

i mam tu fragment
  1. echo {
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.  
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>WebNot</title>
  8. <link rel="stylesheet" type="text/css" href="style.css" />
  9. </head>
  10.  
  11. <body>
  12. Notka została dodana
  13. </body>
  14.  
  15. </html>
  16. }

Lecz nie wyświetla mi tego, jak zrobić żeby wyświetlało?
CuteOne
  1. echo '
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.  
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>WebNot</title>
  8. <link rel="stylesheet" type="text/css" href="style.css" />
  9. </head>
  10.  
  11. <body>
  12. Notka została dodana
  13. </body>
  14.  
  15. </html>';
topik53
dziekuje bardzo mi pomogłeśsmile.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.