Member Avatar for panam72

Need help with the following to put a website back online. Im not the most experienced PHP programmer so yuor help is appreciated.

The error:
Parse error: syntax error, unexpected T_STRING in /home/stacklab/public_html/includes/content/homepage_content.php on line 5

The Syntax:
<?php

define("HOMEPAGE_CONTENT",'<div align="justify" class="homepageContent"><p><h1> Buy Legal Steroids & Bodybuilding Supplements Online - The Labs Difference </h1></p><p>Welcome to StackLabs. Here you can find muscle building supplements to increase your muscle size and strength. For the last six years, Labs has been a leading supplier of high-quality, affordable bodybuilding supplements.</p>

Thanks guys

Can you post lines 1 to 6 so we can see the true error.

and please make sure to use code tags.

Member Avatar for panam72

Lines 1-6 are these (cut and pasted as it appears). Line 1 is <?php

<?php

define("HOMEPAGE_CONTENT",'<div align="justify" class="homepageContent"><p><h1> Buy Legal Steroids & Bodybuilding Supplements Online - The Labs Difference </h1></p><p>Welcome to StackLabs. Here you can find muscle building supplements to increase your muscle size and strength. For the last six years, Labs has been a leading supplier of high-quality, affordable bodybuilding supplements.</p>

thanks

That l@@ks like lines 1-3 but below is the corrected version of you copied correctly.

<?php

define("HOMEPAGE_CONTENT",'<div align="justify" class="homepageContent"><p><h1> Buy Legal Steroids & Bodybuilding Supplements Online - The Labs Difference </h1></p><p>Welcome to StackLabs. Here you can find muscle building supplements to increase your muscle size and strength. For the last six years, Labs has been a leading supplier of high-quality, affordable bodybuilding supplements.</p>');
Member Avatar for panam72

Made the changes and now im told the error is in line 4.
Please help

Could you please post the first 12 lines so I can see what I am changing?

Member Avatar for panam72

<?php

define("HOMEPAGE_CONTENT",'<div align="justify" class="homepageContent"><p><h1> Buy Legal & Bodybuilding Supplements Online - The Stacklabs Difference </h1></p><p>Welcome to Labs. Here you can find legal and muscle building supplements to increase your muscle size and strength. For the last six years, Labs has been a leading supplier of high-quality, affordable alternatives (aka legal steroids) and bodybuilding supplements.</p>');
<p>Our quality selection of discount bodybuilding supplements will enhance your workout performance beyond your current level assuring you get the consistent results that serious bodybuilders need. Whether you are trying to cut up (harden your muscles) or bulk up, we have the muscle products you need. The Labs line of superior bulking and cutting muscle supplements have been well received by our customers nationwide because of their affordable prices and the outstanding, high-quality results they help provide.</p>
<p>All of our legal, fat burners, and bodybuilding supplements are made with the safest and most effective ingredients modern science has to offer. Our products have been designed by biochemical engineers with the input of professional athletes and serious body builders. They have been put through rigorous testing and have been found to be completely safe and free of harmful side effects. Labs' bodybuilding supplements contain NO artificial ingredients, sweeteners or additives.</p>
<p>Buying online from Labs has never been easier. Our user friendly website is easy to navigate. We assure the security of your online transaction. You can shop for legal, bodybuilding supplements, amino acids, creatine, fat burners and more. Just choose the category that best fits your bodybuilding goals and select your item.</p>
<p>Labs' muscle building products provide the results your muscles crave. Apart from supporting your bodybuilding goals, Labs' muscle building products also enhance mental focus and well-being, help protect against oxidative stress, support healthy nitric oxide levels and libido, and boost your immune system. Make Labs the basis of your body's physical evolution!</p></div>

Ok... so the problem is: You're using the single quote character within your data. In essence, everywhere

define("HOMEPAGE_CONTENT",'<div align="justify" class="homepageContent"><p><h1> Buy Legal & Bodybuilding Supplements Online - The Stacklabs Difference </h1></p><p>Welcome to Labs. Here you can find legal and muscle building supplements to increase your muscle size and strength. For the last six years, Labs has been a leading supplier of high-quality, affordable alternatives (aka legal steroids) and bodybuilding supplements.</p>
<p>Our quality selection of discount bodybuilding supplements will enhance your workout performance beyond your current level assuring you get the consistent results that serious bodybuilders need. Whether you are trying to cut up (harden your muscles) or bulk up, we have the muscle products you need. The Labs line of superior bulking and cutting muscle supplements have been well received by our customers nationwide because of their affordable prices and the outstanding, high-quality results they help provide.</p>
<p>All of our legal, fat burners, and bodybuilding supplements are made with the safest and most effective ingredients modern science has to offer. Our products have been designed by biochemical engineers with the input of professional athletes and serious body builders. They have been put through rigorous testing and have been found to be completely safe and free of harmful side effects. Labs\' bodybuilding supplements contain NO artificial ingredients, sweeteners or additives.</p>
<p>Buying online from Labs has never been easier. Our user friendly website is easy to navigate. We assure the security of your online transaction. You can shop for legal, bodybuilding supplements, amino acids, creatine, fat burners and more. Just choose the category that best fits your bodybuilding goals and select your item.</p>
<p>Labs\' muscle building products provide the results your muscles crave. Apart from supporting your bodybuilding goals, Labs\' muscle building products also enhance mental focus and well-being, help protect against oxidative stress, support healthy nitric oxide levels and libido, and boost your immune system. Make Labs the basis of your body\'s physical evolution!</p></div>

that should fix what you've shown us. The problem is: Everywhere you see the ' character within the content, you need to add a backslash in front of it. I'm not sure why you're even defining a constant like that...

Member Avatar for panam72

Changed the text below to eliminate the plural words but im still getting the same syntax error on line 4...

Parse error: syntax error, unexpected '<' in /home/stacklab/public_html/includes/content/homepage_content.php on line 4

Please help
----

<?php

define("HOMEPAGE_CONTENT",'<div align="justify" class="homepageContent"><p><h1> Buy Legal & Bodybuilding Supplements Online - The Labs Difference </h1></p><p>Welcome to Labs. Here you can find legal and muscle building supplements to increase your muscle size and strength. For the last six years, Labs has been a leading supplier of high-quality, affordable alternatives (aka legal) and bodybuilding supplements.</p>');
<p>Our quality selection of discount bodybuilding supplements will enhance your workout performance beyond your current level assuring you get the consistent results that serious bodybuilders need. Whether you are trying to cut up (harden your muscles) or bulk up, we have the muscle products you need. The Labs line of superior bulking and cutting muscle supplements have been well received by our customers nationwide because of their affordable prices and the outstanding, high-quality results they help provide.</p>
<p>All of our legal, fat burners, and bodybuilding supplements are made with the safest and most effective ingredients modern science has to offer. Our products have been designed by biochemical engineers with the input of professional athletes and serious body builders. They have been put through rigorous testing and have been found to be completely safe and free of harmful side effects. Labs bodybuilding supplements contain NO artificial ingredients, sweeteners or additives.</p>
<p>Buying online from Labs has never been easier. Our user friendly website is easy to navigate. We assure the security of your online transaction. You can shop for legal, bodybuilding supplements, amino acids, creatine, fat burners and more. Just choose the category that best fits your bodybuilding goals and select your item.</p>
<p>Labs muscle building products provide the results your muscles crave. Apart from supporting your bodybuilding goals, Labs muscle building products also enhance mental focus and well-being, help protect against oxidative stress, support healthy nitric oxide levels and libido, and boost your immune system. Make Labs the basis of your physical evolution!</p></div>

You need to go ahead and remove the '); part to the end of your content, so that all of it gets included in the define statement.

Try this.

<?php

define("HOMEPAGE_CONTENT",'<div align="justify" class="homepageContent"><p><h1> Buy Legal & Bodybuilding Supplements Online - The Labs Difference </h1></p><p>Welcome to Labs. Here you can find legal and muscle building supplements to increase your muscle size and strength. For the last six years, Labs has been a leading supplier of high-quality, affordable alternatives (aka legal) and bodybuilding supplements.</p>
<p>Our quality selection of discount bodybuilding supplements will enhance your workout performance beyond your current level assuring you get the consistent results that serious bodybuilders need. Whether you are trying to cut up (harden your muscles) or bulk up, we have the muscle products you need. The Labs line of superior bulking and cutting muscle supplements have been well received by our customers nationwide because of their affordable prices and the outstanding, high-quality results they help provide.</p>
<p>All of our legal, fat burners, and bodybuilding supplements are made with the safest and most effective ingredients modern science has to offer. Our products have been designed by biochemical engineers with the input of professional athletes and serious body builders. They have been put through rigorous testing and have been found to be completely safe and free of harmful side effects. Labs bodybuilding supplements contain NO artificial ingredients, sweeteners or additives.</p> 
<p>Buying online from Labs has never been easier. Our user friendly website is easy to navigate. We assure the security of your online transaction. You can shop for legal, bodybuilding supplements, amino acids, creatine, fat burners and more. Just choose the category that best fits your bodybuilding goals and select your item.</p>
<p>Labs muscle building products provide the results your muscles crave. Apart from supporting your bodybuilding goals, Labs muscle building products also enhance mental focus and well-being, help protect against oxidative stress, support healthy nitric oxide levels and libido, and boost your immune system. Make Labs the basis of your physical evolution!</p></div>');

If that still doesn't work then post the entire file.

You cannot use this character: " or ' within the string unless you write it like this: \" or \'. You cannot have a string within another string. Just add backslashes to all ' and " characters. That should solve it! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.