Your designer has done you a great favour, bogu. It is really attractive, and very subtle. Yes, you must get busy on it, and getting a few tutorials on there is an excellent idea. (We aspiring coders need lots of help!)
PHP sites often tend to be subtle and sophisticated. Congratulations.
This is what I am trying to do. 'id=10' is the record with the pagebreaks. This doesn't work yet, but it seems I am not far away. If you can spot the fault(s), I'd be really very pleased.
if( isset($_GET['id']))
{
$id = $_GET['id'];
$result = mysql_query("SELECT
sub,
head,
pix,
intro,
story,
byline,
link,
DATE_FORMAT(updated, '%d/%m/%y %H%i') as ud
FROM connex
WHERE id=$id
");
$myrow = mysql_fetch_array($result);
if ($_GET['id'] == 10)
{
$story = $result['story'];
// If no page specified, default to the first page ($page = 0)
if (!isset($_GET['page'])) {
$page = 0;
} else {
$page = $_GET['page'];
}
// Split the text into an array of pages
$textarray = spliti('\[PAGEBREAK]', $story);
// Select the page we want
$story = $textarray[$page];
$PHP_SELF = $_SERVER['PHP_SELF'];
if ($page != 0) {
$prevpage = $page - 1;
echo "<p><a href=\"$PHP_SELF?id=$id&page=$prevpage\">".
'Previous Page</a></p>';
}
//echo "<p>$b</p>";
//+ + + + + + + + + + + + id 10 +
//these are the stories on the other pages
if ($myrow["sub"]) printf("<h6 class=\"guard\">%s\n</h6>", $myrow["sub"]);
// 11/3/06 if ($myrow["sub"]) printf("<div class=\"Subheads\">%s\n</div>", $myrow["sub"]);
if ($myrow["intro"])printf("<div class=\"intro\">%s\n</div>", $myrow["intro"]);
if ($myrow["head"]) printf("<h4>%s\n</h4>", $myrow["head"]);
if ($myrow["pix"]) printf("<img src=\"images %s", $myrow["pix"]);
printf(" %s\n<br>", $myrow["story"]);
//+ + + + + + + + + + + + +
if ($myrow["byline"]) printf("<div class=\"names2\">- %s</div>", $myrow["byline"]);
printf("<div id=\"date2\"> Updated: %s</div><p>",$myrow["ud"]);
//10/3/06 = = = = = I N C L U D E S F O R L I N K S
echo '<p></p>';
include "contact_expert.inc.php";
include "work_chances.inc.php";
if ($page < count($textarray) - 1) {
$nextpage = $page + 1;
echo "<p><a href=\"$PHP_SELF?id=$id&page=$nextpage\">".
'Next Page</a></p>';
}
}
}
//==================================================
elseif($_GET['id'] == 1) {
etc etc (elseifs for other record IDs.)