Jump to content

webready

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Everything posted by webready

  1. Continued.... Basically I want the URL in the address bar to match the URL in the canonical. Thanks Again!
  2. Ok, I knew there would be something else In some case I actually use "%2D" in my URL's were I want the. The "%2D" stays in the URL address bar. But, in the canonical URL, it shows a "+". Anyway to make sure the canonical version prints the "%2D" and not the decoded "+". I know, I'm crazy! Thanks again
  3. WOW, thank you so much, I believe it worked!!! Can't thank you enough. I don't want to mark as "solved" yet as I want to go live with it to completely verify. Thank you again!
  4. Hi Fortnox007, Thanks for the reply. Unfortunately I'm even more confused. Anyway to incorporate the str_replace ("+"," ",$desc); RIGHT INTO <link rel="canonical" href="http://www.mysite.com/page.php?IT=<?php print $item; ?>&IT2=<?php print $desc; ?>" /> like <?php echo $desc; "NEW STR CODE GOES HERE"?> Thanks again!
  5. Hello All, I'm using php to auto-insert variables into a canonical url within the <head>. Here is my code: <link rel="canonical" href="http://www.mysite.com/page.php?IT=<?php print $item; ?>&IT2=<?php print $desc; ?>" /> I used this to replace "+" with " ". <?php $desc = str_replace ("+"," ",$desc); ?> The problem is i use the variables in different sections of the page were I don't want the "+" to appear. I only want the "+" to appear in the canonical url space. I'm sure there is an easy way, but not for me So to sum up: I want srt_replace code to be incorporated into the <?php print $desc; ?> code ONLY. Thanks in advance for any help!
  6. Hello All! I was hoping one of you phpFreaks could help me out I have the following code that produces links from a database. Certain sets of results have over 3000 links. I can currently set the amount of links to display per page but that's it. I would like to be able to truncate the links to all the pages using pagination. Any help would be greatly appreciated! Here is the code: <?php echo "Results<br><HR WIDTH=100% SIZE=1><br>"; mysql_connect("mysite.com", "mysite_mysite", "mysitepassword") or die(mysql_error()); mysql_select_db("user_database") or die(mysql_error()); if (isset($_GET['pagenum'])) { $pagenum = $_GET['pagenum']; } else { $pagenum = 1; } $rpg = $pagenum; $data = mysql_query("SELECT * FROM mydb WHERE mfg='golf'") or die(mysql_error()); $rows = mysql_num_rows($data); $page_rows = 80; $last = ceil($rows/$page_rows); if ($pagenum < 1) { $pagenum = 1; } elseif ($pagenum > $last) { $pagenum = $last; } $max = 'limit ' .($pagenum - 1) * $page_rows .',' .$page_rows; $data_p = mysql_query("SELECT * FROM mydb WHERE mfg='golf' $max") or die(mysql_error()); while($info = mysql_fetch_array( $data_p )) { $page=$info['link']; echo "<a href='$page' class='blue1'>". $info['title'] . "</a><br>"; } echo "<p>"; if ($pagenum > $last) {$pagenum=1;} else { echo "<HR WIDTH=100% SIZE=1><br>"; $pagenum = 1; while ($pagenum <= $last) { $next = $pagenum; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$next' class='g5'>$pagenum</a> "; $pagenum = $pagenum+1; } Echo "<br><br>Page $rpg of $last <br>"; } ?> Simple insertion of pagination would be GREAT! Thanks guys....
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.