Unstoppable Domains

PHP and Meta Tag Issues

Spaceship Spaceship
Watch

LazyD

Established Member
Impact
0
I am having an issue with PHP and Meta Tags on my website. For the longest time I have wondered why my site is not getting indexed, I ran a quick Meta Tag Analyzer and it turns out that the Meta Tags for my pages werent being read at all.

It looks like the culprit is PHP on the page above the Meta Tags, once I remove the PHP code the Meta Tags work fine.

The problem with that is that on many of my pages I use a $_GET to get a Category and SubCat from the URL which then goes through a SWITCH statement that defines the meta information like title, keywords, description etc. So, if I cant put that PHP info above my meta tags im stuck with putting them below, which is an issue because the the variables are then blank because they havent been set yet.

What can I do to resolve this problem?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Try setting the values to a default values if you detect the $_GET values arent set.
 
0
•••
There's probably something wrong with your PHP.. If you post the code, someone should be able to help you work it out.
 
0
•••
Here it is....

Also, a quick note that if you View Source, the meta tags show up correctly..

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
		<html>
			<head>
<?php include("Admin/config.php");
include("Admin/Ads/randad.php");
$CategoryGet=$_GET['Category'];
$SubCategoryGet=$_GET['SubCat'];
$CardIDGet=$_GET['CardID'];
$CardNameGet=$_GET['CardName'];

switch ($CategoryGet){
	case "bad":
	If (isset($SubCategoryGet)) {
		switch ($SubCategoryGet) {
			case "bad":
			$PageTitle = "getCredit365.Com | Credit Cards for Bad Credit";
			$Headline = "Credit Cards for Bad Credit";
			$query = "SELECT * FROM Cards WHERE Category='Poor Credit'";
			$Keywords = "bad credit card, credit cards for bad credit, poor credit, no credit, damaged credit, instant bad credit, bad credit visa, bad credit mastercard";
			break;
			case "prepaid":
			$PageTitle = "getCredit365.Com | Pre-Paid/Debit Cards";
			$Headline = "Pre-Paid/Debit Cards";
			$query = "SELECT * FROM Cards WHERE Category='Pre-Paid'";
			$Keywords = "pre paid credit card, pre paid card, debit card, secured credit card, secured card bad credit, secured bad credit, pre paid debit card, pre paid visa, pre paid mastercard";
			break;
			case "catalog":
			$PageTitle = "getCredit365.Com | Catalog Credit Cards";
			$Headline = "Catalog Credit Cards";
			$query = "SELECT * FROM Cards WHERE Category='Catalog'";
			$Keywords = "catalog credit card, catalog card, bad catalog credit, USA catalog";
			break;
		}
		} Else {
			$PageTitle = "getCredit365.Com | All Cards for Bad Credit";
			$Headline = "All Cards for Bad Credit";
			$query = "SELECT * FROM Cards WHERE Category='Poor Credit' OR Category='Pre-Paid' OR Category='Catalog'";
			$Keywords = "bad credit card, secured card, pre paid credit card, catalog credit, no credit credit card, poor credit credit card";
		}
		break;
		case "good":
		$PageTitle = "getCredit365.Com | Credit Cards for Good Credit";
		$Headline = "Credit Cards for Good Credit";
		$query = "SELECT * FROM Cards WHERE Category='Regular' OR Category='Charge'";
		$Keywords = "credit card, good credit credit card, excellent credit credit card, visa card, mastercard, visa credit card, mastercard credit card, amex, american express card";
		break;
		case "rewards":
		If (isset($SubCategoryGet)) {
			switch ($SubCategoryGet) {
				case "airline":
				$PageTitle = "getCredit365.Com | Airline Rewards Credit Cards";
				$Headline = "Airline Rewards Credit Cards";
				$query = "SELECT * FROM Cards WHERE Category='Reward - Airline'";
				$Keywords = "airline rewards credit card, united rewards credit card, southwest rewards, american airlines rewards credit card, air credit card";
				break;
				case "auto":
				$PageTitle = "getCredit365.Com | Auto/Gas Rewards Credit Cards";
				$Headline = "Auto/Gas Rewards Credit Cards";
				$query = "SELECT * FROM Cards WHERE Category='Reward - Auto' OR Category='Reward - Gas'";
				$Keywords = "auto rewards credit card, car rewards credit card, gas rewards, gasoline rewards, gas credit card";
				break;
				case "cash":
				$PageTitle = "getCredit365.Com | Cash/Retail Rewards Credit Cards";
				$Headline = "Cash/Retail Rewards Credit Cards";
				$query = "SELECT * FROM Cards WHERE Category='Reward - Cash' OR Category='Reward - Other' OR Category='Reward - Retail' ";
				$Keywords = "cash rewards credit card, retail rewards credit card, cash back credit card, cash rewards, retail rewards, overstock rewards, ebay rewards, amazon rewards";
				break;
				case "travel":
				$PageTitle = "getCredit365.Com | Travel Rewards Credit Cards";
				$Headline = "Travel/Hotel Rewards Credit Cards";
				$query = "SELECT * FROM Cards WHERE Category='Reward - Travel' OR Category='Reward - Hotel'";
				$Keywords = "travel rewards credit card, hotel rewards credit card, travel rewards, hotel rewards, hilton rewards card, starwood rewards, travel credit card, hotel credit card";
				break;
			}
			} Else {
				$PageTitle = "getCredit365.Com | All Rewards Credit Cards";
				$Headline = "All Rewards Credit Cards";
				$query = "SELECT * FROM Cards WHERE Category='Reward - Cash' OR Category='Reward - Auto' OR Category='Reward - Travel' OR Category='Reward - Gas' OR Category='Reward - Hotel' OR Category='Reward - Airline' OR Category='Reward - Retail' OR Category='Reward - Other'";
				$Keywords = "rewards credit cards, visa rewards credit, mastercard rewards credit, travel rewards credit card, cash back credit card, reward credit card, points credit card";
			}
			break;
			case "student":
			$PageTitle = "getCredit365.Com | Student Credit Cards";
			$Headline = "Student Credit Cards";
			$query = "SELECT * FROM Cards WHERE Category='Student'";
			$Keywords = "student credit card, college credit card, student credit, college credit, student rewards credit card, no credit student credit";
			break;
			case "business":
			$PageTitle = "getCredit365.Com | Business Credit Cards";
			$Headline = "Business Credit Cards";
			$query = "SELECT * FROM Cards WHERE Category='business' OR Category='Business'";
			$Keywords = "business credit card, small business credit card, home business credit card, business credit, small business credit";
			break;
			default:
			$PageTitle = "getCredit365.Com | Most Popular Credit Cards";
			$Headline = "Most Popular Credit Cards";
			$query = "SELECT * FROM Cards WHERE CardID=595 OR CardID=720 OR CardID=23 OR CardID=88 OR CardID=1033";
			$Keywords = "popular credit cards, most popular credit cards, american express, visa, mastercard, discover, american express card, visa card";
			break;
		}
?>
				<title><? echo $PageTitle ?></title>
				<link rel="stylesheet" type="text/css" href="http://getcredit365.com/style.css"/>
				<meta name="title" content="getCredit365.Com - <? echo $CategoryGet ?> Credit Cards" />
				<meta http-equiv="Content-Type" content="text/html; windows-1252" />
				<meta name="robots" content="index, follow" />
				<meta name="description" content="We can help you find the perfect credit card, loan or insurance for any situation. Currently browsing - <? echo $Headline ?>" />
				<meta name="keywords" content="<? echo $Keywords ?>" />
				<meta name="MSSmartTagsPreventParsing" content="true" />
				<META name="verify-v1" content="4/ak52G3czdnRnZJxDAs0/qc/137WLUAmqoQFEIfZyk=" />
				<!--[if lte IE 6]>
				<link rel="stylesheet" type="text/css" href="http://getcredit365.com/iehacks.css" />
				<![endif]-->
			</head>
 
0
•••
LazyD said:
Also, a quick note that if you View Source, the meta tags show up correctly..
That's kinda weird.. if they show up, I don't understand why they wouldn't show up.. D-:

www.iwebtool.com/metatags_extractor is able to extract the meta tags..
 
0
•••
0
•••
The only thing that I could think of is that they have crappy code (although I just looked at it and it's pretty nice.) :X

The meta tags are obviously there..
 
0
•••
There was another site that would test Google PR and Backlinks and also show Alexa and Site description, I tested it for 3 sites including the site im having issues with. The description didnt show up for this site(The one im asking about now) but it did for the 2 other sites so theres gotta be an issue....Also those 2 other sites are indexed by Google but this site isnt...
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back