Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Shipping.php and Privacy PROBLEM !


16 replies to this topic

#1 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 18 February 2010, 22:41

i'm not an expert in PHP and i'm not familiar with it but i know that i should put the shipping text between these '....' anyway i have done it several times, one with only text and the result is that all the text go beside each other no spacing between the lines or breaks :(

and the other one with PHP But i guess i have a problem so please somebody help me
define('TEXT_INFORMATION', '<?php
echo "<P style=\"MARGIN: auto 0in\" class=txtgray><FONT face=Verdana><B><SPAN style=\"LINE-HEIGHT: 130%; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma\">Effective 18/2/2010 <BR></SPAN></B><FONT color=#555555 size=1> </FONT></FONT></P>\n"; 
echo "<P style=\"LINE-HEIGHT: normal; MARGIN: auto auto 0pt; mso-add-space: auto; tab-stops: .25in\" class=MsoNormalCxSpFirst><B><SPAN style=\"FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma\">Table Of Contents: <?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" /><o:p></o:p></SPAN></B></P><B><SPAN style=\"LINE-HEIGHT: 115%; FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 'Times New Roman'; blblabla .......................?>');
?>


Please tell me the where are the mistakes

Thanks alot

Edited by Sam-Matthews, 18 February 2010, 22:42.


#2 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 18 February 2010, 22:44

View PostSam-Matthews, on 18 February 2010, 22:41, said:

i'm not an expert in PHP and i'm not familiar with it but i know that i should put the shipping text between these '....' anyway i have done it several times, one with only text and the result is that all the text go beside each other no spacing between the lines or breaks :(

and the other one with PHP But i guess i have a problem so please somebody help me
define('TEXT_INFORMATION', '<?php
echo "<P style=\"MARGIN: auto 0in\" class=txtgray><FONT face=Verdana><B><SPAN style=\"LINE-HEIGHT: 130%; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma\">Effective 18/2/2010 <BR></SPAN></B><FONT color=#555555 size=1> </FONT></FONT></P>\n"; 
echo "<P style=\"LINE-HEIGHT: normal; MARGIN: auto auto 0pt; mso-add-space: auto; tab-stops: .25in\" class=MsoNormalCxSpFirst><B><SPAN style=\"FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma\">Table Of Contents: <?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" /><o:p></o:p></SPAN></B></P><B><SPAN style=\"LINE-HEIGHT: 115%; FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 'Times New Roman'; blblabla .......................?>');
?>


Please tell me the where are the mistakes, i guess i have a problem with the fonts ??? is that right ?!

Thanks alot


#3 mdtaylorlrim

  • Community Member
  • 2,497 posts
  • Real Name:Mark
  • Gender:Male

Posted 18 February 2010, 23:14

Every single quote you use in that BREAKS the php code.
Avoid the most asked question. See How to Secure My Site and How do I...?

#4 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 18 February 2010, 23:18

View Postmdtaylorlrim, on 18 February 2010, 23:14, said:

Every single quote you use in that BREAKS the php code.

So what should i do now ?? remove the ??? or what ?

#5 mdtaylorlrim

  • Community Member
  • 2,497 posts
  • Real Name:Mark
  • Gender:Male

Posted 18 February 2010, 23:24

View PostSam-Matthews, on 18 February 2010, 23:18, said:

So what should i do now ?? remove the ??? or what ?
This will work..

define('TEXT_INFORMATION', 'this works fine');

define('TEXT_INFORMATION', 'this work\'s fine');

define('TEXT_INFORMATION', 'but this break's the code');

Avoid the most asked question. See How to Secure My Site and How do I...?

#6 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 18 February 2010, 23:26

okay i will try it now give me 1 sec and i will get back to you

thanks alot

#7 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 18 February 2010, 23:30

View Postmdtaylorlrim, on 18 February 2010, 23:24, said:

This will work..

define('TEXT_INFORMATION', 'this works fine');

define('TEXT_INFORMATION', 'this work\'s fine');

define('TEXT_INFORMATION', 'but this break's the code');

It works now but, look there is anther problem :S

Parse error: syntax error, unexpected T_STRING in /home/essooo1/public_html/privacy.php on line 18


echo "<P style=\"LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-add-space: auto; tab-stops: .25in\" class=MsoNormal><B><SPAN style=\"FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma\">Table Of Contents: <?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" /><o:p></o:p></SPAN></B></P>\n"; 

Edited by Sam-Matthews, 18 February 2010, 23:35.


#8 mdtaylorlrim

  • Community Member
  • 2,497 posts
  • Real Name:Mark
  • Gender:Male

Posted 18 February 2010, 23:49

'Verdana'

Escape ALL of your single quotes. The double quotes should be ok.
Avoid the most asked question. See How to Secure My Site and How do I...?

#9 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 19 February 2010, 00:04

View Postmdtaylorlrim, on 18 February 2010, 23:49, said:

'Verdana'

Escape ALL of your single quotes. The double quotes should be ok.


Thanks alot it works fine actually there was no error but when i logg into the privacy page i find it's blank and there is nothing in it at all in both browsers IE & Morzilla

Have you seen that before :o

#10 mdtaylorlrim

  • Community Member
  • 2,497 posts
  • Real Name:Mark
  • Gender:Male

Posted 19 February 2010, 00:20

View PostSam-Matthews, on 19 February 2010, 00:04, said:

Thanks alot it works fine actually there was no error but when i logg into the privacy page i find it's blank and there is nothing in it at all in both browsers IE & Morzilla

Have you seen that before :o
Yeah, that's what usually happens when your quotes are mis matched.
Avoid the most asked question. See How to Secure My Site and How do I...?

#11 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 19 February 2010, 00:23

View Postmdtaylorlrim, on 19 February 2010, 00:20, said:

Yeah, that's what usually happens when your quotes are mis matched.

would you please explain what do u mean mis matched , i'm sorry i can't get it.

also if you can give me an example that would be nice of u

Many Thanks

Sam-matthews

#12 mdtaylorlrim

  • Community Member
  • 2,497 posts
  • Real Name:Mark
  • Gender:Male

Posted 19 February 2010, 00:36

View PostSam-Matthews, on 19 February 2010, 00:23, said:

would you please explain what do u mean mis matched , i'm sorry i can't get it.

also if you can give me an example that would be nice of u

Many Thanks

Sam-matthews
Ok, when assigning a value to a variable it is done like this:

$variable = 'this_value';

So, let's say that you want the following to be assigned to $variable

The long day's work was well worth the effort.

Let's put that in the code...

$variable = 'The long day's work was well worth the effort.';

The php processor will assign the text within the first two single quotes to $variable, but will really not know what to do with the remainder of the line. There is a single quote embedded within the text and the php processor will assume the end of the text as soon as it hits the second single quote in the word day's.

See where this is going? php expects a specific syntax, and when the rules are not followed it generates errors. Sometimes the errors are pretty clear, and other times they are not. Sometimes it just throws blank pages and puts the error text in the log file.

Edited by mdtaylorlrim, 19 February 2010, 00:37.

Avoid the most asked question. See How to Secure My Site and How do I...?

#13 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 19 February 2010, 00:56

View Postmdtaylorlrim, on 19 February 2010, 00:36, said:

Ok, when assigning a value to a variable it is done like this:

$variable = 'this_value';

So, let's say that you want the following to be assigned to $variable

The long day's work was well worth the effort.

Let's put that in the code...

$variable = 'The long day's work was well worth the effort.';

The php processor will assign the text within the first two single quotes to $variable, but will really not know what to do with the remainder of the line. There is a single quote embedded within the text and the php processor will assume the end of the text as soon as it hits the second single quote in the word day's.

See where this is going? php expects a specific syntax, and when the rules are not followed it generates errors. Sometimes the errors are pretty clear, and other times they are not. Sometimes it just throws blank pages and puts the error text in the log file.



define('TEXT_INFORMATION', '$var="<P style=\"MARGIN: auto 0in\" class=txtgray><FONT face=Verdana><B><SPAN style=\"LINE-HEIGHT: 130%; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma\">Effective 18/2/2010 <BR></SPAN></B><FONT color=#555555 size=1>&nbsp;</FONT></FONT></P>";
$var="<P style=\"LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-add-space: auto; tab-stops: .25in\" class=MsoNormal><B><SPAN style=\"FONT-FAMILY: "Verdana","sans-serif"; COLOR: #434a55; FONT-SIZE: 8.5pt; mso-bidi-font-family: Tahoma\">Table Of Contents: <?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" /><o:p></o:p></SPAN></B></P>";

Take a look :S

Is it wrong ? i have done all the script like this but it shows me a blank page as well

I guess it seems so hard :(

#14 mdtaylorlrim

  • Community Member
  • 2,497 posts
  • Real Name:Mark
  • Gender:Male

Posted 19 February 2010, 01:09

View PostSam-Matthews, on 19 February 2010, 00:56, said:


Take a look :S

Is it wrong ? i have done all the script like this but it shows me a blank page as well

I guess it seems so hard :(
Why don't you start with something easy and work your way up. Only use text without any single quotes. You can use html but don't use any single quotes. Avoid using that crap code that Office or WYSIWYG editors put out. Use some plain old html code. At least until you get the hang of it.
Avoid the most asked question. See How to Secure My Site and How do I...?

#15 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 19 February 2010, 01:28

View Postmdtaylorlrim, on 19 February 2010, 01:09, said:

Why don't you start with something easy and work your way up. Only use text without any single quotes. You can use html but don't use any single quotes. Avoid using that crap code that Office or WYSIWYG editors put out. Use some plain old html code. At least until you get the hang of it.

i don't mind at all i didn't know that i can use html. however, would you please tell me exactly what should i do now i have the article i wanna put in the privacy policy,, so the Question is.. how can i put in that page correctly with the same look it's now ?! i mean like the paragraphs it holds now the way it look the font it has and the color as well .... so if there anyway to do that so please tell me. from here

define('TEXT_INFORMATION', 'Put here your Privacy Notice information.');
?>

Thanks alot i know that i have bothered you so much and i have asked alot of Questions

#16 mdtaylorlrim

  • Community Member
  • 2,497 posts
  • Real Name:Mark
  • Gender:Male

Posted 19 February 2010, 01:38

No bother, that's how you learn. I'd rather help someone learn than to simply do it for them...

Try some html code in there, and it can be on multiple lines...

define('TEXT_INFORMATION', 'Put here your Privacy Notice information. <BR><BR>
<P>This is your first line.
<P>This is another.
<P><font size=+2>This is enlarged.</font>
<P><font color=red>This is red text.</font>
<P>This is really simple html code.
');

Avoid the most asked question. See How to Secure My Site and How do I...?

#17 Sam-Matthews

  • Community Member
  • 34 posts
  • Real Name:Sam

Posted 19 February 2010, 01:51

View Postmdtaylorlrim, on 19 February 2010, 01:38, said:

No bother, that's how you learn. I'd rather help someone learn than to simply do it for them...

Try some html code in there, and it can be on multiple lines...

define('TEXT_INFORMATION', 'Put here your Privacy Notice information. <BR><BR>
<P>This is your first line.
<P>This is another.
<P><font size=+2>This is enlarged.</font>
<P><font color=red>This is red text.</font>
<P>This is really simple html code.
');


Many thanks and i hope that i will not disappoint you. but i'm afraid to tell you that even the default Privacy.php file doesn't work any more with my oscommerce installation, i mean even with the default file it shows up a blank page .... so what does that mean ? do i have to install it again or what should i do now ??