Jump to content

Recommended Posts

[!--quoteo(post=322412:date=Nov 27 2005, 03:34 AM:name=virtual_odin)--][div class=\'quotetop\']QUOTE(virtual_odin @ Nov 27 2005, 03:34 AM) 322412[/snapback][/div][div class=\'quotemain\'][!--quotec--]

Show us your code. Immediate thoughts:

Have you started with <?php ?

Is the page name xxx.php ?

Have you sent headers?

 

<?php: yes

xxx.php: yes

headers: no

 

The data is taken from mysql into a variable,

and then echoed:

echo "\n $summary";

 

I'm thinking the echo is the problem...

Link to comment
https://forums.phpfreaks.com/topic/2940-include-php-from-mysql/#findComment-9927
Share on other sites

[!--quoteo(post=322893:date=Nov 28 2005, 06:14 PM:name=marcus1060)--][div class=\'quotetop\']QUOTE(marcus1060 @ Nov 28 2005, 06:14 PM) 322893[/snapback][/div][div class=\'quotemain\'][!--quotec--]

<?php: yes

xxx.php: yes

headers: no

 

The data is taken from mysql into a variable,

and then echoed:

echo "\n $summary";

 

I'm thinking the echo is the problem...

 

Try this.

echo $summary ."\n";

Link to comment
https://forums.phpfreaks.com/topic/2940-include-php-from-mysql/#findComment-9942
Share on other sites

Another xxx.php page displays correctly, yes?

 

Could it be that some of your global options are getting in the way? run PHP() and look at magic_quotes_gpc. I have just run up a test page and it works fine on my set up. magic_quotes ar off in my set up.

 

Also, try dropping the quotes and the \n and just echo the variable.

Link to comment
https://forums.phpfreaks.com/topic/2940-include-php-from-mysql/#findComment-9999
Share on other sites

[!--quoteo(post=324173:date=Dec 3 2005, 09:57 AM:name=virtual_odin)--][div class=\'quotetop\']QUOTE(virtual_odin @ Dec 3 2005, 09:57 AM) 324173[/snapback][/div][div class=\'quotemain\'][!--quotec--]

Another xxx.php page displays correctly, yes?

 

Could it be that some of your global options are getting in the way? run PHP() and look at magic_quotes_gpc. I have just run up a test page and it works fine on my set up. magic_quotes ar off in my set up.

 

Also, try dropping the quotes and the \n and just echo the variable.

Another xxx.php page displays correctly, yes?: yes

 

magic_quotes_gpc:

Had em on didn't work, had em off didn't work.

 

[a href=\"http://noveis.net/?page=php\" target=\"_blank\"]http://noveis.net/?page=php[/a] to see my php()

 

[a href=\"http://noveis.net/\" target=\"_blank\"]http://noveis.net/[/a] and view the source you'll see some php in the top article.

 

removing ."\n": no dice

Link to comment
https://forums.phpfreaks.com/topic/2940-include-php-from-mysql/#findComment-10003
Share on other sites

Could it be some nesting going on? Is your displayed bit of php within a string being echoed. I think this would achieve the result you are getting. You'd need to close the echo with "; before php would look for the next command otherwise it will just assume it is part of the echo.

Link to comment
https://forums.phpfreaks.com/topic/2940-include-php-from-mysql/#findComment-10021
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.