0
if($rewrite) {
			    echo "<p><a href=\"/blog-". $blog[0] ."-$clean_url\">" .$blog[3]."</a><br>";
			} else {
		        echo "<p><a href=\"". $blog_url ."?d=". $blog[0] ."\">" .$blog[3]."</a><br>";
			}

Hi Folks,

I am a complete novice with PHP and I cannot get this routine to work. I need to change $blog_url to an actual URL - http://www.mydomain.co.uk/blog_rec.php

I cannot seem to get the format right.

Any help will be greatly appreciated.

Thanks. John.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by simplypixie
0

First of all I would tidy up your script so you can more easily read what you are doing, plus there appears to be an error in line 2:

if($rewrite) {
			    echo '<p><a href="/blog-'. $blog[0] .'-'.$clean_url.'">' .$blog[3].'</a><br>';
			} else {
		        echo '<p><a href="'. $blog_url .'?d='. $blog[0] .'">' .$blog[3].'</a><br>';
			}

If your $blog_url only holds blog_rec.php then change the 2nd echo to:

echo '<p><a href="http://www.mydomain.co.uk/'. $blog_url .'?d='. $blog[0] .'">' .$blog[3].'</a><br>';
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.