NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Help... PHP

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-23-2008, 09:22 AM THREAD STARTER               #1 (permalink)
Senior Member
 
-Ray-'s Avatar
Join Date: Jun 2005
Location: Pennsylvania
Posts: 1,839
-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of
 



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);
????: NamePros.com http://www.namepros.com/programming/485011-help-php.html
 

$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;
????: NamePros.com http://www.namepros.com/showthread.php?t=485011

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;
}
}
?>
__________________
Poker News, articles, discussion
LIKE THIS

Its an iPod, a phone, and an internet communications device.
Last edited by -Ray-; 06-23-2008 at 01:13 PM.
-Ray- is offline  
Old 06-23-2008, 10:00 AM   #2 (permalink)
NamePros Member
Join Date: Sep 2006
Posts: 99
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  
Old 06-23-2008, 10:12 AM THREAD STARTER               #3 (permalink)
Senior Member
 
-Ray-'s Avatar
Join Date: Jun 2005
Location: Pennsylvania
Posts: 1,839
-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of
 



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.
__________________
Poker News, articles, discussion
LIKE THIS

Its an iPod, a phone, and an internet communications device.
Last edited by -Ray-; 06-23-2008 at 10:28 AM.
-Ray- is offline  
Old 06-23-2008, 11:47 AM   #4 (permalink)
Domains my Dominion
 
sdsinc's Avatar
Join Date: Aug 2005
Location: Web 1.0
Posts: 9,552
sdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatnesssdsinc Has achieved greatness
 


Third World Education Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Find Marrow Donors! Animal Rescue Animal Cruelty AIDS/HIV Animal Rescue Wildlife Breast Cancer Animal Rescue Wildlife
It looks like the Unicode byte order mark. You may need to use another editor to remove that from your code.
__________________
NameNewsletter.com - free lists of available domain names
ZoneFiles.net (beta) - ccTLD and gTLD droplists
sdsinc is offline  
Old 06-23-2008, 11:48 AM THREAD STARTER               #5 (permalink)
Senior Member
 
-Ray-'s Avatar
Join Date: Jun 2005
Location: Pennsylvania
Posts: 1,839
-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of-Ray- has much to be proud of
 



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
????: NamePros.com http://www.namepros.com/showthread.php?t=485011

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...
__________________
Poker News, articles, discussion
LIKE THIS

Its an iPod, a phone, and an internet communications device.
-Ray- is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:40 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger