Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 03-21-2014, 05:37 AM   #1
mikhapop
Registered User
 
Join Date: Mar 2014
Posts: 19
if you want to store any code as data you must put it as text and then in the view you can put <?php and ?>

example


in index.php


$query = "SELECT * FROM some_table WHERE anything = anything";
$results = mysql_query($query); ---->will get you the php code you stored as text

while ($text = mysql_fetch_array($results))
{
echo "<?php";
echo $text['php'];
echo "?>";
}


the result will be
<?php
some php code here
?>

but as i said it will be represented as text not as code to run
__________________
Mega Business Solutions!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
mikhapop is offline   Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:58 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.