Solved

storing a function in a DB?

Posted on 2002-07-14
2
200 Views
Last Modified: 2006-11-17
is it possible to do something like storing the function's body into a DB ?

so everyting my phpscript runs, it grabs the code from the DB?

cuz I have to construct querystring for so my script submit to differents forms on the web but not all form takes the same input and/or in a different way.

example: state, some will use the 2 letters code while other will take the full name
or date, some will have one field for date, while other may have a field for day, month and year.

so basically, I would do concatenation and other basic operation so it sends out the correct query string.

For each form, I would store the correct function into my DB.

The problem I see, is once I do something like
$sql = "SELECT * FROM myTable WHERE ID=1";

$result = ExecuteQuery($sql);

$result will contain the correct code.. but how can I RUN this code as a function?

Thanks
0
Comment
Question by:higijj
2 Comments
 
LVL 5

Accepted Solution

by:
Hamlet081299 earned 100 total points
ID: 7153042
Check out the eval() function in PHP help.
0
 
LVL 2

Author Comment

by:higijj
ID: 7153325
Thanks a lot!

I should have know that one :)

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Be edit-table when I click the edit button (turn into inputs boxes) 7 27
php simple error message 4 22
error log using ftp 7 38
How can I make this form submit to itself? 10 25
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now