PHP Out Of Database.
Started by Hyprkookeez, Sep 29 2005 04:55 PM
11 replies to this topic
#1
Posted 29 September 2005 - 04:55 PM
I want to have a phpbased site system, and with it I want everything to basically be part of a database. I can't seem to figure out how to export <?php ?> stuffs to well.. PHP. it goes as a comment in browser-side.
Anyone care to help me out?
Anyone care to help me out?
#2
Posted 29 September 2005 - 05:23 PM
whats the extension for the file where you have php? it must be .php, not .html.php, just .php
#3
Posted 29 September 2005 - 05:47 PM
I have it .php... It's just I have a plan to store the info in a database, and it won't let me echo php out of it.
#4
Posted 29 September 2005 - 06:00 PM
make sure your host allows php and it is turned on
#5
Posted 29 September 2005 - 06:11 PM
http://php.net/manua...asic-syntax.php
http://php.net/manua...mysql-query.php
From what i understand, those links may help untill you give us an example of your problem.
http://php.net/manua...mysql-query.php
From what i understand, those links may help untill you give us an example of your problem.
#6
Posted 29 September 2005 - 08:34 PM
Ugh!!!!!!!!
I know php!!!!
Okay.. i'm beginning to think nobody knows my problem...
I have a script in my MYSQL DATABASE and when i ECHO The script it appears as a comment on my page, instead of ACTUAL PHP...
I highlighted the important parts.
It has something to do with explode() or something.
Can anyone suggest something now that you might get it?
I know php!!!!
Okay.. i'm beginning to think nobody knows my problem...
I have a script in my MYSQL DATABASE and when i ECHO The script it appears as a comment on my page, instead of ACTUAL PHP...
I highlighted the important parts.
It has something to do with explode() or something.
Can anyone suggest something now that you might get it?
#7
Posted 29 September 2005 - 09:28 PM
Ok, question. By comment, do you mean that in the html source, it still has the PHP tags, or html comment tags, or does it just echo out plain text?
Either way, would the eval() function help you any?
p.s. Whether or not you know php, the way you worded things made it sound like those links would really help
And yet again, if the above function doesn't work, a copy/paste example would REALLY help. (i.e. the source php, and end html source).
Either way, would the eval() function help you any?
p.s. Whether or not you know php, the way you worded things made it sound like those links would really help
#8
Posted 30 September 2005 - 01:15 AM
He's trying to store code in a database, he wants to echo out scripts form a database
#9
Posted 30 September 2005 - 01:13 PM
if i what i think your thinking is right..i must tell you that you cannot echo out php scripts.. They will just turned over into php..
you just need to either post your code or atleast explain a little more
you just need to either post your code or atleast explain a little more
#10
Posted 30 September 2005 - 03:20 PM
HaloprO, on Sep 29 2005, 11:15 PM, said:
He's trying to store code in a database, he wants to echo out scripts form a database
#11
Posted 30 September 2005 - 06:04 PM
You guys are funny, here do this
<?php
$php_code = '<?php echo "example php code, you can even assign this variable a value of soemthing from a database"; ?>';
echo eval('?>'.$php_code);
?>
Replace the value of the $php_code variable with whatever you want
#12
Posted 30 September 2005 - 06:31 PM
Thank you so much! You're like a lifesaver!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
