note 68025 deleted from function.eval by philip
| From: | philip@php.net | Date: | Tue, 11 Jul 2006 06:29:28 +0000 |
| Subject: | note 68025 deleted from function.eval by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-114650@lists.php.net to get a copy of this message | ||
Note Submitter: raul dot gonzalez at laredo dot edu
Reason: useless
----
I used the slopy example below. Seems to work, it retrieves a list of variables with its respective
values from an Access Database through a form. Then I use eval to use the values from the form and
change them to variables. I am looking for a better method but it does the trick for now. Warning
not to use this method if someone other than you will have access to the HTML form.
<?
$instructor = $_POST['instructor'];
require_once('connection_corral.php'); //LA CONNECTION A LA BASE DE DATOS
echo "<table>";
echo "<th><u>#</u></th>";
echo "<th><u>Student ID</u></th>";
echo "<th><u>Name</u></th>";
echo "<th><u>Times</u></th>";
echo "<th><u>Elapse</u></th>";
$total_records = $_POST['total_records'];
echo "There are " . $total_records . " Records for " . $instructor;
$n = 0;
while ($n < $total_records){
eval($all_records = $_POST['all_records']); //this passes all variables as variables
$total_records = count($CWID); //this counts the number of items in the array
$rs = $conn->Execute("SELECT * FROM WorkFilespring2006 WHERE
CWID = '$CWID[$n]'
AND Inst = '{$instructor}'
AND TutCode <> '070'
AND TutCode <> '080'
AND TutCode <> '010'
AND TutCode <> '011'
ORDER BY vNAME DESC");
$total_hours = 0;
$total_minutes = 0;
$total_seconds = 0;
$i = 0;
while (!$rs->EOF) {
blablabla
$i++;
}
$rs->Close();
?>