|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem building metatags
I want to have to have different metatags for different pages and store them in my database. My problem is that when I create them using something like this:
I want to have to have different metatags for different pages and store them in my database. My problem is that when I create them using something like this: echo"<meta name="keywords" content="Generates,Custom,stats,hits,counter,unique,vi">"; it returns this: <META content=Generates,Custom,stats,hits,counter,unique ,vi name=keywords> Which I'm not sure will be read right by search engines. I can use this: echo"<?meta name="keywords" content="Generates,Custom,stats,hits,counter,unique,vi">"; that reurns this: <?meta name="keywords" content="Generates,Custom,stats,hits,counter,unique,vi"> but then again, I'm not sure that is right, with the "?" in it. Is there some other way of doing this? |
|
#2
|
|||
|
|||
|
RE: Problem building metatags
Hmmm..I'm not sure on that one..however you echo it, that is how it should be in your html source. Can you give me an example of a page where you are doing this?
|
|
#3
|
|||
|
|||
|
RE: Problem building metatags
If you are going to save them in a database, you will need to echo them from a variable.
1) Get the MetaTag from the table. i.e. $Row=mysql_fetch_array($result)); 2) then echo($Row["tag"]); Also remember to addslashes() when saving them and stipslashes() when printing them. i.e. echo(stripslashes($Row["tag"]); |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Problem building metatags |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|