• Register
80,955 questions
451,523 answers
5 comments
55,485 users
Welcome to Help & how to!
Ask questions and receive answers from other members of the community.
Help and how to is a free service. No registration needed.

[SOLVED] Editing Guestbook (PHP)

1 like 0 dislike

First of all, I am a beginner in PHP and therefore is bad style and other things to Computing
I'm working on my website, which also includes a guestbook.
The guest book I've finished, I leave it the more entries into a text file named
"Kommentare.txt" schreiben.Nun I want to create a small "administrative part", from which one
The comments and posts editieren.Nur if I let it run in the next version will (depending upon which checkbox has been ticked) either all or only the last entries are deleted or a new erstellt.Hat anyone any suggestions or see the error?
<b> G


asked 2 years ago in PHP, MySQL etc. by Erik TAA¶yrAA¤ (350 points)

12 Answers

0 like 0 dislike
Marginal. The code is not indented. Incidentally, the code for PHP [PHP] tags is preferable because of the beautiful syntax highlighting
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
consciously sorry, I do not code:<b> G
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
Please use when posting source code here in the forums [CODE] [/ CODE] tags or HTML and PHP source code, the [HTML] [/ HTML] and [php] [/ PHP] tags.
For information see here: BBCodes
In Standard-/Erweiterten editor you can activate in the settings, you will also find appropriate buttons.
The use of variable variables testifies often of bad style.
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
PHP Code: (! Feof ($ dh)) {while / * as is often the file has lines * /

$ Number; / * the number is increased * /
}
}
     Since e.g. inkrementierst you are not expected. $ Number is 1 and is increased only if $ row [1] was passed. Siest you if you ever PHP code: echo $ number;
     einbaust in your loop. Your $ number should be increased but safe at any time through the loop, you must install accordingly. PHP Code:
     At this point you are using the variable $ comment, which comes from the top. Because when you save the file in a loop line by line reads, because the matter is therefore nurnoch inside the last line. So you read a complete file that you want to replace in the PHP code: $ contents = file_get_contents ("Kommentare.txt");
...

      
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
PHP Code:<b> G
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
The question of whether you're ready to present your code so that someone wants to read - because what you have there looks to "higgledy-piggledy" from. Times puts you in the shoes of the people you would be willing to help are doing to your code but not because he simply can not be read because no one wants to move a purely first quarter of an hour m¼ssen.****: / / ***.buxaprojects.com / en / php_c...guidelines.htm
What you lack in the code are especially debugging information, simply echo'n all times what happens.
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
Quote:
Originally Posted by vanilla thunder I'm still not a PHP expert, but since the text is marked so colorful me this line jumps extremely eye, especially The two dollar signs ****://php.net/manual/de/language.va...s.variable.php
But I think we shall, as has already written wbch avoid more ...
greetz
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
PHP Code:<b> G
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
Quote:
Quote from joshmami PHP code: $ entries ["$ number"] = $ number $;
     ! I'm still not a PHP expert, but since the text is marked so colorful me this line jumps extremely eye, especially The two dollar signs
answered 2 years ago by Erik TAA¶yrAA¤ (350 points)
0 like 0 dislike
Hello! deeakde interesting deeakde site! I'm really like it! Very, very deeakde good!
answered 1 year ago by anonymous
0 like 0 dislike
Very nice site! cheap viagra
answered 1 year ago by anonymous
0 like 0 dislike
answered 1 year ago by anonymous

Please log in or register to answer this question.