[advanced search]
Results from the most recent live auction are here.
15 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 06-23-2008, 08:22 AM   · #1
-Ray-
An American Soldier
 
-Ray-'s Avatar
 
Name: Ray
Location: Pennsylvania
Trader Rating: (25)
Join Date: Jun 2005
Posts: 1,521
NP$: 347.25 (Donate)
-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold
Help... PHP

Ok...

i lied the unicode marker is still visibe in firefox? how can this be. I never had this problem before...




Im confused.. My script at http://theymix.com/test21.php?alp=a&page=1 seems to work fine...

However.. combinded with the layout the nav numbers move to the bottom of the results and have a weird  next to them.
http://theymix.com/search/by-letter/t/1/ -- See what I mean...

------------Code Snippet-----------

PHP Code:
$p = new Pager;
$start = $p->findStart($limit,$id4);


$count = mysql_num_rows(mysql_query("SELECT * FROM ---- WHERE LEFT(title,1) = '$alp'"));

$pages = $p->findPages($count, $limit);

$pagelist = $p->pageList($id4, $pages, $urlqry);
echo
$pagelist;

$result = mysql_query("SELECT * FROM ---- WHERE LEFT(title,1)='$alp' ORDER BY title ASC LIMIT $start, $limit")
or die(
mysql_error());  
while(
$row = mysql_fetch_array( $result )) {

$word= $row['title'];
$id=$row['id'];

$data = explode(' recipe',$word);

echo (
"<a href=\"http://theymix.com/drink/$id/\">" . $data[0] . "</a><br>");



pagerclass.php
-------------------

PHP Code:
<?php
class Pager
{
function
findStart($limit,$id4)
{
if ((!isset(
$id4)) || ($id4 == "1"))
{
$start = 0;
$id4 = 1;
}
else
{
$start = ($id4-1) * $limit;
}

return
$start;
}
function
findPages($count, $limit)
{
$pages = (($count % $limit) == 0) ? $count / $limit : floor($count / $limit) + 1;

return
$pages;
}
function
pageList($curpage, $pages, $urlqry)
{

$page_list = "";

/* Print the first and previous page links if necessary */
if (($curpage != 1) && ($curpage))
{
$page_list .= "<a href=\"".$urlqry."1/\" title=\"First Page\">First</a> ";
}

if ((
$curpage-1) > 0)
{
$page_list .= "<a href=\"". $urlqry.($curpage-1)."/\" title=\"Previous Page\">Previous</a> ";
}

/* Print the numeric page list; make the current page unlinked and bold */
for ($i=1; $i<=$pages; $i++)
{
if (
$i == $curpage)
{
$page_list .= "<b>".$i."</b>";
}
else
{
$page_list .= "<a href=\"". $urlqry.$i."/\" title=\"Page ".$i."\">".$i."</a>";
}
$page_list .= " ";
}

/* Print the Next and Last page links if necessary */
if (($curpage+1) <= $pages)
{
$page_list .= "<a href=\"". $urlqry.($curpage+1)."/\" title=\"Next Page\">Next</a> ";
}

if ((
$curpage != $pages) && ($pages != 0))
{
$page_list .= "<a href=\"". $urlqry.$pages."/\" title=\"Last Page\">Last</a> ";
}
$page_list .= "</td>\n";

return
$page_list;
}
}
?>


Please register or log-in into NamePros to hide ads

Last edited by -Ray- : 06-23-2008 at 12:13 PM.
-Ray- is offline   Reply With Quote
Old 06-23-2008, 09:00 AM   · #2
Bruce_KD
NamePros Member
 
Trader Rating: (1)
Join Date: Sep 2006
Posts: 78
NP$: 100.00 (Donate)
Bruce_KD will become famous soon enoughBruce_KD will become famous soon enough
So is your question why it's printing out those symbols?
I don't think you even gave the code that prints the page numbers...
If you don't feel comfortable posting it, you can PM or email it to me, but we'll probably need more than this small snippet to help.


Bruce
Bruce_KD is offline   Reply With Quote
Old 06-23-2008, 09:12 AM   · #3
-Ray-
An American Soldier
 
-Ray-'s Avatar
 
Name: Ray
Location: Pennsylvania
Trader Rating: (25)
Join Date: Jun 2005
Posts: 1,521
NP$: 347.25 (Donate)
-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold
yes my question is why it is printing out the symbols and why the page list is going to the bottom when it is added to a page.

Last edited by -Ray- : 06-23-2008 at 09:28 AM.
-Ray- is offline   Reply With Quote
Old 06-23-2008, 10:47 AM   · #4
sdsinc
Law and disorder
 
sdsinc's Avatar
 
Name: Kate
Location: Expat
Trader Rating: (57)
Join Date: Aug 2005
Posts: 5,294
NP$: 1121.11 (Donate)
sdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond reputesdsinc has a reputation beyond repute
Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV
It looks like the Unicode byte order mark. You may need to use another editor to remove that from your code.
__________________
Now on sale: BudgetLettings.com
sdsinc is offline   Reply With Quote
Old 06-23-2008, 10:48 AM   · #5
-Ray-
An American Soldier
 
-Ray-'s Avatar
 
Name: Ray
Location: Pennsylvania
Trader Rating: (25)
Join Date: Jun 2005
Posts: 1,521
NP$: 347.25 (Donate)
-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold-Ray- is a splendid one to behold
Originally Posted by Kath
It looks like the Unicode byte order mark. You may need to use another editor to remove that from your code.



but its not on there when there is no html atttached to the script

ok.. i got the page list back at the top of the page because i found a $page_list .= "</td>\n";

... however.. i still cannot get rid of those wierd caracters.. i tried opening up in notepage and saving but no luck...

Originally Posted by Kath
It looks like the Unicode byte order mark. You may need to use another editor to remove that from your code.



thansk mate.... it was byte mark.. i removed it with a script i found...

-- Solved

ok.. i cannot rid of the unicode marker in firefox.. i tried everything...
-Ray- is offline   Reply With Quote
Reply

NamePros is a revenue sharing forum.

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Click to Watch Instant Video Traffic Down Under Arcade Script
Advertise your business at NamePros
All times are GMT -7. The time now is 12:16 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0