MYSQL in Content

Manuel324

Mitglied
Hallo,

Ich habe einen Link in der mysql genauso wie der inhalt vom link.

nun möchte ich das der inhalt vom link im content erscheint,

http://9oogle.de/

Hier ist die hp.

Meine index sieht so aus

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Angebote</title>
<meta name="keywords" content="" />
<meta name="Cool Black" content="" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- start header -->
<div id="header">
	<div id="logo">
		<h1><a href="#">Angebote</a></h1>
		<p></p>
	</div>
</div>
	<div id="menu">
		<ul id="main">
			<li class="current_page_item"><a href="index.php?seite=home">Home</a></li>
			<li><a href="index.php?seite=products">Products</a></li>
			<li><a href="index.php?seite=service">Service</a></li>
			<li><a href="index.php?seite=aboutus">About Us</a></li>
			<li><a href="index.php?seite=contactus">Contatc Us</a></li>
		</ul>
	</div>
	
<!-- end header -->
<div id="wrapper">
	<!-- start page -->
	<div id="page">
		<div id="sidebar1" class="sidebar">
			<ul>
				<li>
					<h2>Anbieter</h2>
					<ul>
					  <?php include("include/ausgabe.php"); ?>
											</ul>
				</li>
				<li>
				  <h2>Archives</h2>
					<ul>

				  </ul>
				</li>
		  </ul>
  </div>
		<!-- start content -->
		<div id="content">
		  <div class="post">
				<h1 class="title"><a href="#">Welcome to Our Website!</a></h1>
					<p class="byline"><small>Posted on October 1st, 2009 by <a href="#">Free CSS Templates</a></small></p>
					<div class="entry">
						<p><strong> 
 <?php 
switch ($_GET['seite']) {

           case "home":
        	  default;
          include"site/home.php";
	
          break;
		  
          case "products":
          include"site/products.php";
          break;
		  
		  case "service":
          include"site/service.php";
          break;
		  
          case "auboutus":
          include"site/auboutus.php";
          break;
		  
		  case "contact":
          include"site/contact.php";
          break;
		  
          case "linkinhalt":
          include"site/content.php";
          break;
		  
};
?></a></p>
					</div>
			</div>
			<div class="post">
			  <p class="byline">&nbsp;</p>
		  </div>
		</div><!-- end content -->
		<!-- start sidebars -->
<div id="sidebar2" class="sidebar">
			<ul>
				<li>
					<form id="searchform" method="get" action="#">
						<div>
							<h2>Site Search</h2>
					      <input type="text" name="s" id="s" size="15" value="" />
						</div>
					</form>
				</li>
				<li>
					<h2>Tags</h2>
					<p class="tag"><a href="#">dolor</a> <a href="#">ipsum</a> <a href="#">lorem</a> <a href="#">sit amet</a> <a href="#">dolor</a> <a href="#">ipsum</a> <a href="#">lorem</a> <a href="#">sit amet</a></p></li>

<li>
					<h2>Categories</h2>
					<ul>

					</ul>
				</li>
			</ul>
		</div>
		<!-- end sidebars -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end page -->
</div>
<div id="footer">
	<p class="copyright">&copy;&nbsp;&nbsp;2009 All Rights Reserved &nbsp;&bull;&nbsp; Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
	<p class="link"><a href="#">Privacy Policy</a>&nbsp;•&nbsp;<a href="#">Terms of Use</a></p>
</div>
</body>
</html>

Ich hoffe ihr könnt mir helfen. :( Ich finde keinen weg, wie ich es sonst machen könnte das der inhalt dort angezeigt wird.

Gruß

Manuel
 
PHP:
 <?php 
switch ($_GET['seite']) {

           case "home":
        	  default;
          include"site/home.php";
	
          break;
		  
          case "products":
          include"site/products.php";
          break;
		  
		  case "service":
          include"site/service.php";
          break;
		  
          case "auboutus":
          include"site/auboutus.php";
          break;
		  
		  case "contact":
          include"site/contact.php";
          break;
		  
          case "linkinhalt":
          include"site/content.php";
          break;
		  
};
?>

Include-Anweisung bitte include("site/content.php");

Eine Lösung für dein Problem habe ich nicht, da ich dein Problem nicht verstehe... sry ;-)

Gruß, Do_0mi
 
Huhu :)

Versuch es mal damit:

PHP:
<?php
if(isset($_GET['seite'])){
 switch ($_GET['seite']) {

           case "home":
              default;
          include("site/home.php");

          break;

          case "products":
          include("site/products.php");
          break;

          case "service":
          include("site/service.php");
          break;

          case "auboutus":
          include("site/auboutus.php");
          break;

          case "contact":
          include("site/contact.php");
          break;

          case "linkinhalt":
          include("site/content.php");
          break;
 }
}
elseif (isset($_GET['id'])){

          @include("pfad/inhalt.php");
}
else {
          @include("site/home.php");
}
?>

Den Pfad zur Inhaltsseite musst du noch anpassen.
Die Links für den Inhalt rufst du dann einfach so auf:

Code:
<a href="index.php?id=1">linkname</a>

Gruß Maeniel
 
Zuletzt bearbeitet:
Zurück