Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
newbie needs some help.
Old 03-03-2008, 01:06 AM newbie needs some help.
daddy2five's Avatar
Skilled Talker

Posts: 77
Name: Daniel
Location: Stony Point , Noth Carolina
Trades: 0
im using the following code to try and generate a dynamic navigation menu. It will generate the menu right, but i dont know how to make my data appear on the pages. I am missing something. I want to display what is in the "string" on the page. I am thinking i need to create a variable to hold the data ,but how do i do that? Please help me. I found this class on the internet, and I would love to use it on my website. Thanks so much for any help you can offer. here is where i found the code on the net. It is a tutorial on how to create a dynamic nav menu.

Code:
http://www.onlamp.com/pub/a/php/2000/11/02/next_previous.html?page=1
Code:
<?php

// database connection stuff
$db = mysql_connect("localhost","user","pass");
mysql_select_db("GraphicsDB", $db) or die(mysql_errno() . ": " . mysql_error() . "<br>");

// including the navbar class
include("navbar.php");
// initiate it!
$nav = new navbar;
// set how many records to show at a time
$nav->numrowsperpage = 1;
$sql = "SELECT string FROM Graphics ORDER BY id ASC ";

$sql_Result = mysql_query($sql,$db) or die(mysql_error() );

// the third parameter of execute() is optional
$result = $nav->execute($sql, $db, "mysql");
// handle the returned result set
$rows = mysql_num_rows($result);
for ($y = 0; $y < $rows; $y++) {
  $data = mysql_fetch_object($result);
  echo $row1;
  echo $data->url . "<br>\n";
}

 echo "<hr>\n";
// build the returned array of navigation links
$links = $nav->getlinks("all", "on");
for ($y = 0; $y < count($links); $y++) {
  echo $links[$y] . "&nbsp;&nbsp;";
}



?>
__________________
What is Yuwie?

Please login or register to view this content. Registration is FREE
daddy2five is offline
Reply With Quote
View Public Profile Visit daddy2five's homepage!
 
 
Register now for full access!
Reply     « Reply to newbie needs some help.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09608 seconds with 12 queries