Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Wyswietlanie Html w PHP
topik53
post
Post #1





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

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


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?
Go to the top of the page
+Quote Post
CuteOne
post
Post #2





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

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


  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>';


Ten post edytował CuteOne 30.09.2010, 20:38:45
Go to the top of the page
+Quote Post
topik53
post
Post #3





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

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


dziekuje bardzo mi pomogłeśsmile.gif
Go to the top of the page
+Quote Post

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: 20.08.2025 - 22:22