Hello everyone i am new here and quite new to PHP. I have a couple of questions and would be grateful if anyone could answer them.
I am creating a niche directory site and i have made php create a new page from some form data using the following.
file_get_contents
str_replace
fwrite
and a few things. I have used place holders to create these pages and also to create a link to these new pages.
On part where a new link is created i make the script write a new placeholder ready for the next new entry.
Hope you are still with me!! anyway my questions are..
1. Is using placeholders the best way to go about this or is there another way?
2. What is the best way to hide these placeholders on a page that people will be viewing as they are unsightly. I was thinking of making the text the same colour as the background but they will still be visible if highlighted and i have also heard i would be penalised by google for hiding text and i want my page to rank well and not annoy the search engines.
Thank you very much for any help in advance!!
Matt
Placeholders
Moderator: General Moderators
Re: Placeholders
Any sample code?
Re: Placeholders
This is the code creating the link on a page that already exists.
this is an example of a page with a place holder on.
http://www.musicandmediadirectory.co.uk ... #southwest
There are going to be alot more (placeholders), one for each region but i would like to know the best way to hide them (the placeholders) .
Code: Select all
$link1 = "<a href=\"/directory/business/";
$link2 = $html_file_name;
$link3 = "\">".$data['businessname']."</a>";
$linkplaceholder = "$region";
$link = $link1.$link2.$link3;
$linkdetails = "$link"."<br>$region";
$temp_path = "/home/zqyrdetv/public_html/directory/";
$temp_file = "$businesstype";
$temp = file_get_contents($temp_path.$temp_file);
$addbusiness = str_replace($linkplaceholder, $linkdetails, $temp);
$fp = fopen($temp_path.$businesstype, "w");
fwrite($fp, $addbusiness);
fclose($fp);
http://www.musicandmediadirectory.co.uk ... #southwest
There are going to be alot more (placeholders), one for each region but i would like to know the best way to hide them (the placeholders) .