05-06-2013, 04:38 AM | #1 |
Registered User
Join Date: Mar 2013
Posts: 246
|
create dynamic php page title?
Hi friends,
I want to make my website's product-detail pages title dynamic. so help me how can i create this in php. please share your suggestion. thanks.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
05-16-2013, 02:55 AM | #2 |
Registered User
Join Date: Apr 2013
Location: Sydney
Posts: 127
|
Hi Noah i think this code will be helpful for you
<?php error_reporting("E_ALL ^ E_NOTICE"); $story = $_GET['story']; include 'admin/connect.php'; $getlist="Select * from news where id='$story'"; $result= mysqli_query($con,$getlist); while($row= mysqli_fetch_array($result)) { $a=$row[Heading]; } ?> and put this code in heading code between title tag code are below: <title><?php echo $a;?></title>
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
10-16-2013, 09:07 AM | #3 | ||
Registered User
Join Date: Oct 2013
Posts: 15
|
Pick up the title from mysql before html tag eg. title variable is $title.
Quote:
|
||
12-16-2013, 10:37 AM | #4 |
Registered User
Join Date: Dec 2013
Posts: 44
|
database query is the best..
|
12-18-2013, 05:31 AM | #5 |
Registered User
Join Date: Dec 2013
Posts: 30
|
would advise that you use a templating engine such as PHPTAL, or XSLT if you prefer, rather than having header and footer files to do your printing.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
03-07-2014, 01:28 AM | #6 |
Registered User
Join Date: Mar 2014
Posts: 71
|
We can create the dynamic page with the help of php. For known about the tutorial php w3school is best tutorial provide.......
|
03-07-2014, 02:29 AM | #7 |
Registered User
Join Date: Mar 2014
Location: India
Posts: 13
|
thanks it works......
|
04-17-2014, 11:20 PM | #8 |
Registered User
Join Date: Jan 2014
Posts: 176
|
In php you have to store the pages in a database and from there you have to fetch these images using suitable function to show the images. Put the images in a folder. You have to put edit, delete, and update queries with it.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
04-23-2014, 12:12 AM | #9 |
Registered User
Join Date: Apr 2014
Location: UK
Posts: 15
|
Agreed. Best way. Also don't use queries on each page just for this. Create another variable in the php page called page_title to which you add as you generate the page (e.g. add article title if any) then output it in the template system.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Secrete for seo | alina albert | Search Engine Optimization | 87 | 03-11-2018 05:47 AM |
How important is the page title? | hadenpowell031 | Search Engine Optimization | 33 | 05-01-2017 11:09 PM |
Coach Web site SEO - Terrific Title Tags | theshawnchin | Search Engine Optimization | 1 | 01-21-2013 10:25 PM |
What is the importance of the title of the page? | sinicline | Search Engine Optimization | 18 | 01-21-2013 12:49 AM |
Title for a page is very important | stichdsouza233 | Search Engine Optimization | 3 | 09-28-2012 10:48 PM |