hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Store PHP in MYSQL
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Store PHP in MYSQL

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-03-2011, 11:11 AM
Danny159 Danny159 is offline
Web Hosting Evangelist
 
Join Date: Aug 2007
Location: Oakham England
Posts: 454

Store PHP in MYSQL


Hey,

I want to store PHP code in a mysql database... but im not sure how I would process it...

I will use php to insert it into the db but not sure how to stop it from runnig etc?

Anyone help?

Dan

__________________
Streama - Your WordPress Friend
http://www.streama.co.uk

Reply With Quote


Sponsored Links
  #2  
Old 08-03-2011, 11:32 AM
8088 8088 is offline
Web Hosting Master
 
Join Date: Nov 2010
Posts: 616
Make it a string.

PHP Code:
<?php
$php 
"<?php echo 'Hello world'; ?>";
$php mysql_real_escape_string($php);
$sql "INSERT INTO table (php) VALUES ('$php')";
mysql_query($sql) or die(mysql_error());
?>

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
mySQL error took store down NeonRider VPS Hosting 12 09-23-2007 03:25 AM
Is it possible to store MySQL db's in each members dir instead of /var/lib/mysql/ ? astounding Hosting Security and Technology 3 12-03-2006 12:54 PM
[mysql] What do you think is the best way to store such data? Barti1987 Programming Discussion 8 12-11-2005 05:06 PM
is there a free php store template like MS ibuyspy store jt2377 Programming Discussion 0 04-05-2003 09:37 AM

Related posts from TheWhir.com
Title Type Date Posted
Web Host Rackspace Launches Private Beta for MySQL Cloud Database Web Hosting News 2011-12-01 21:09:51
Parallels Now Offering Licenses for CloudLinux OS Web Hosting News 2011-10-26 17:29:25
SSL Certificate Firm The SSL Store Appoints VP of Operations Web Hosting News 2011-09-07 15:00:49
Web Hosting Sales and Promos Roundup - August 26, 2011 Web Hosting News 2011-08-26 20:43:23
Web Host FireHost Partners with Cloud Security Firm Gazzang for Data Encryption Web Hosting News 2011-08-16 20:33:43


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?