0

I try to "create" a simple website. Read sth. about it some days before. I use a template, there is a style.css. I use this css for the style of my website. I try to insert a guestbook. Use this: http://www.php-einfach.de/tuts_php_gb.php I want to show each entry in a extra "content box", its a div in the CSS. Looks like the gray one on these site: ferienhaus-krueger-templin. de

I insert this in my PHP-"Script" to "

echo "<div id="content"><div class="contentbox"<h1>Von <a href=\"mailto:$zerlegen[0]\">$zerlegen[1]</a>
  am $zerlegen[2]</h1>\n
   $zerlegen[3]
   </div></div>";

Without using div it work, with the divs from the CSS it looks like this: http://marvpaul.lima-city.de/gaestebuch.php

Hope someone can help my!

2
  • You're missing a > on the opening tag of your contentbox div. Commented Dec 21, 2014 at 16:13
  • Change all your "s to 's inside the echo. Commented Dec 21, 2014 at 16:16

3 Answers 3

1

Within PHP the speech marks " " should only be put at the start and finish of something you wish to echo, else the browser gets confused and throws an error, then all of the HTML speech marks should be replaced with singles as so:

echo "<div id='content'><div class='contentbox'<h1>Von <a href=\'mailto:$zerlegen[0]\'\$zerlegen[1]</a>
      am $zerlegen[2]</h1>\n $zerlegen[3] </div></div>";
Sign up to request clarification or add additional context in comments.

Comments

1
echo "<div id=\"content\"><div class=\"contentbox\"><h1>Von <a href=\"mailto:$zerlegen[0]\">$zerlegen[1]</a>
  am $zerlegen[2]</h1>\n
   $zerlegen[3]
   </div></div>";

try, you can read more here http://www.homeandlearn.co.uk/php/php7p7.html

Comments

0

You should change all the double quotes with the single quotes.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.