Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 05-06-2013, 04:38 AM   #1
noahwilson
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.
noahwilson is offline   Reply With Quote

Old 05-16-2013, 02:55 AM   #2
binarynpixel
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.
binarynpixel is offline   Reply With Quote
Old 10-16-2013, 09:07 AM   #3
Ranjan123
Registered User
 
Join Date: Oct 2013
Posts: 15
Pick up the title from mysql before html tag eg. title variable is $title.
Quote:
Quote:
echo the title in <title><? echo $title;?></title>
Ranjan123 is offline   Reply With Quote
Old 12-16-2013, 10:37 AM   #4
NicholasCage
Registered User
 
Join Date: Dec 2013
Posts: 44
database query is the best..
NicholasCage is offline   Reply With Quote
Old 12-18-2013, 05:31 AM   #5
lampdev112
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.
lampdev112 is offline   Reply With Quote
Old 03-07-2014, 01:28 AM   #6
simar
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.......
simar is offline   Reply With Quote
Old 03-07-2014, 02:29 AM   #7
softwin.swapna
Registered User
 
Join Date: Mar 2014
Location: India
Posts: 13
thanks it works......
softwin.swapna is offline   Reply With Quote
Old 04-17-2014, 11:20 PM   #8
shubhamgautam
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.
shubhamgautam is offline   Reply With Quote
Old 04-23-2014, 12:12 AM   #9
guiltyCrown
Registered User
 
Join Date: Apr 2014
Location: UK
Posts: 15
Quote:
Originally Posted by lampdev112 View Post
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.
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.
guiltyCrown is offline   Reply With Quote
Reply


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

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 02:07 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.