Jump to content
Sign in to follow this  
eigan

problemer med vise nyhet script:

Recommended Posts

Hei

 

Har problemer med å vise nyheten...

 

Feilmelding:

 

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/zubznet/public_html/maple-design.net/AdminP/style5/template5/index2.php on line 8

 

<?
 $query = mysql_query("SELECT * FROM nyheter");

      while($row = mysql_fetch_assoc($query))
{
echo <<<end
 <div id="nyhet">
 <div id="nyhet_tittel">$row['tittel']</div>
 <div id="nyhet_innhold">$row['inngress']</div>
 <div id="nyhet_les-mer"><a href=\"endrepost.php?do=edit&id={$row['id']}\" title=\"Edit user\">Les mer</a></div></div>
end;
}
break;
  ?>

 

Takker for svar Mvh Mr Chief

Edited by Mr Chief

Share this post


Link to post

Hadde vært greit med kilden....

 

Edit: wtf?? så ikke kildekoden i stad, tror jeg begynner å bli litt trøtt :hmm:

Edited by trrunde

Share this post


Link to post
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?

mysql_connect("localhost", "#####", "#####") or die("SQL ERROR: Could not connect to database!");

mysql_select_db("zubznet_sobteam") or die("SQL ERROR: Could not select database!");

?>

<html xmlns="http://www.w3.org/1999/xhtml">



<head>

 <meta http-equiv="content-type" content="text/html;charset=utf-8" />

 <meta name="generator" content="Adobe GoLive" />

 <link rel="stylesheet" type="text/css" href="file:///private/var/tmp/folders.501/TemporaryItems/AdapterTemp/zubznet/maple-design.net/AdminP/style5/template5/style.css" />

 <title>index</title>

</head>



<body>

 <div id="hoved">

 <div id="header"></div>

 <div id="linje"></div><br><div id="hoyre_meny"><div id="hoyre_meny_tittel">Nyheter</div><div id="hoyre_meny_tekst">

 Test (<font color="#b01010" size="1px">12/08/06</font>)<br>

 Test2 (<font color="#b01010" size="1px">11/08/06</font>)<br>

 Test3 (<font color="#b01010" size="1px">10/08/06</font>)<br></div><br>



 <div id="hoyre_meny_tittel">Arkiv</div><div id="hoyre_meny_tekst">

 Januar (<font color="#b01010" size="1px">9</font>)<br>

 Februar (<font color="#b01010" size="1px">8</font>)<br>

 Mars (<font color="#b01010" size="1px">11</font>)<br>

 April (<font color="#b01010" size="1px">13</font>)</div></div>

 <div id="navcontainer">

<ul id="navlist">

<li id="active"><a href="#" id="current">Hovedsiden</a></li>

<li><a href="#">Linker</a></li>

<li><a href="#">Gjestebok</a></li>

<li><a href="#">Galleri</a></li>

<li><a href="#">Om meg</a></li>

</ul>

</div>
<?
 $query = mysql_query("SELECT * FROM nyheter");

      while($row = mysql_fetch_assoc($query))
{
echo <<<end
 <div id="nyhet">
 <div id="nyhet_tittel">$row['tittel']</div>
 <div id="nyhet_innhold">$row['inngress']</div>
 <div id="nyhet_les-mer"><a href=\"index2.php?do=lesid&id=$row['id']\" title=\"Les mer\">Les mer</a></div></div>
end;
}
break;
  ?>
 </div><div id="bunn"></div>

</body>



</html>

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...