Hello again!
I am so glad you're helping.
I am currently at work, so I cant test anything. But this is the case:
The link is working.... but there is nothing at "the other side".
If I had a php-file which was named 2.php i guess it would work, but the thing is that the article doesn't appear on iots own page. It is just a text in the database. You see? (Im not to experienced with explaining complicated things in english 🙂)
This is how I do it (or would LIKE to do it).
I got a form on a website where i type in all the info related to the article. The form look like this:
<form action="insert.php" method="post"><br>
Kategori:<br>
<input type="text" name="kategori" /><br><br>
Dag:<br>
<input type="text" name="day" /><br><br>
Måned:<br>
<input type="text" name="month" /><br><br>
År:<br>
<input type="text" name="year" /><br><br>
Tittel:<br>
<input type="text" name="tittel" /><br><br>
Bilde 1:<br>
<input type="text" name="bilde" /><br><br>
Tekst:<br>
<textarea rows="20" cols="50" name="tekst"></textarea><br><br>
<br>
<input type="submit" />
</form>
Then Ive got the insert.php which is putting all these fields into the database.
Then Ive got this code to show the articles first few lines:
<?php
$con = mysql_connect( "localhost", "username", "pwd" ) or die( 'Could not connect: ' . mysql_error() );
mysql_select_db( "my_db", $con ) or die( mysql_error() );
$result = mysql_query( "SELECT id, kategori, day, month, year, tittel, tekst FROM artikler LIMIT 1 , 1 ; " ) or die( mysql_error() );
while($row = mysql_fetch_array($result))
{
echo "<font color=#919191>" . $row['day'] . "." . $row['month'] . "." . $row['year'] . "</font>";
echo "<br />";
echo "<b><font color=B9720E size=2>" . $row['tittel'] . "</font></font></b><br>";
echo substr($row['tekst'], 0, 300) . "...";
echo "<a href=http://www.mysite.com/dansesiden/artikler/artikkel.php?" . "kategori=" . $row['kategori'] . "&id=" . $row['id'] . "><b>Les mer</b></a>";
echo "<br />";
}
mysql_close($con);
?>
Now we are getting to the place where I need help. How can I get the whole article to open as its own page when someone clicks on "Read more"? Do you understand what I mean? 🙂