Any CodeIgniter Expert Gurus out here? |
I am trying to figure out a way to dynamically change the Page title of my product pages and make the URL SEO friendly.
I have the following code in my routes.php file $sql = "SELECT id, title FROM add_pages"; $result = mysql_query($sql); while ($info = mysql_fetch_array($result)) { $str=str_replace(' ','%20',$info['title']); $route[$str] = 'front_controller/display_content/'.$str; } $sql1 = "SELECT * FROM product_mstr"; $result = mysql_query($sql1); while ($info = mysql_fetch_array($result)) { $route['sell_your_phone/'.$info['id']] = 'front_controller/sell_your_phone/'.$info['id']; } As you can see the url is made of product ID. I am trying to change the product ID to be the value that's saved in product NAME section in my database. The problem here is that the product name is part of the body whereas the title and URL is being being pulled before the content even loads. I can't figure out how to actually achieve SEO friendly URL's for my product pages and Dynamic Page Titles using data stored in my database. Any Help? Also the website I am looking at here is www.webuyback.com.au |
Messages In This Thread |
Any CodeIgniter Expert Gurus out here? - by jjalvi - 08-30-2015, 10:12 PM
RE: Any CodeIgniter Expert Gurus out here? - by davidgv88 - 08-31-2015, 12:14 AM
RE: Any CodeIgniter Expert Gurus out here? - by rtorralba - 08-31-2015, 01:28 AM
RE: Any CodeIgniter Expert Gurus out here? - by jjalvi - 08-31-2015, 09:56 PM
RE: Any CodeIgniter Expert Gurus out here? - by davidgv88 - 09-01-2015, 01:27 AM
RE: Any CodeIgniter Expert Gurus out here? - by rtorralba - 09-02-2015, 12:34 AM
|