> You have to eval() the code from the database to get the variables
> replaced
> (or use a regex).
>
> <?php
> $name = 'John';
> $str = file_get_contents('test.txt'); //Reads "Hello $name"
> eval('$str = "' . $str . '";');
> echo $str;
> ?>
Hi John,
That didn't work (eval i dont know regex well enough so dont use them), I
visited the online manual for eval and see that we are on the right track
but I am screwing up somewhere...(as usual)
rather than explain it over and over and confuse everyone, heres the code i
am using:
* * * * * * code * * * * * *
if($sql_exists == 0){} // first checked if there was any sql associated with
this
else{$cust_qry=stripslashes($o_sql);
echo $i2co_order_number; // Testing to see if this variable holds a value,
it does.
eval('$i2co_order_number = "'.$i2co_order_number.'";'); // even tried
putting cust_qry without success
$cust_result = mysql_query($cust_qry);
if(!$cust_result){echo 'Error (S1) running your optional custom SQL
statement.'.mysql_error();}
* * * * * * code * * * * * *
comments? suggestions?
Thanks,
-Ryan A
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php