Forums

error eval() ???

mrkalen 12 Dec, 2012
Hi, i'm coding in custom PHPcode and i saw error eval(), what problem and how to fix it???😟 thanks a lot!
GreyHead 12 Dec, 2012
Hi mrkalen,

Exactly what error do you see and where do you see it?

It's probably an error in your PHP :-(

Bob
mrkalen 13 Dec, 2012
Hi GreyHead,
I used chronoform in popup and i have a error😟

Parse error: parse error in E:\xampp\htdocs\projects\administrator\components\com_chronoforms\form_actions\custom_code\custom_code.php(19) : eval()'d code on line 5

In custom PHPcode at Before Emails Code i write

<?php
$arr = array();
$arr['email'] = $_POST['email'];
$arr['item_id'] = $_POST['item_id'];
$arr['date_reg'] = date('Y-m-d h:i:s');
$arr['status'] = 0;

//======== random string ==========
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$size = strlen( $chars );
for($i = 0; $i < 20; $i++){
   $active_code .= $chars[rand(0, $size - 1)];
}
$arr['active_code'] = $active_code;

echo '<pre>';
print_r($arr);
echo '</pre>';

?>

Help me, Thanks!!!
mrkalen 13 Dec, 2012
i find problem :o thanks GreyHead!!!
This topic is locked and no more replies can be posted.