View Single Post
  #5  
Old 16th September 2009, 14:32
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

Yes, I'm trying to write a PHP script.
I'm with manuals and books studying what I've to do

Basically I've integrated a slider into Roundcube. This slider have 11 steps.
With ISPConfig I've created 11 spam policy, I now the policy_id of that policy.

So now what I want to do is connect PHP with MySQL, so that I could realize something like that:
Code:
$db_host = "localhost";
        $db_user = "root";
        $db_password = "password";
        $db_name = "dbispconfig";
        $db = mysql_connect($db_host, $db_user, $db_password);
        
        if ($db == FALSE)
        die ("Communication error. Please check the parameters of the connection to the mysql database");

        mysql_select_db($db_name, $db)
        or die ("Communication error. Please check the parameters of the connection to the mysql database");

        mysql_query("UPDATE spamfilter_users SET policy_id = '$VALUE_SPAM' WHERE email = '$ROUNDCUBE_USER'");
        //where $VALUE_SPAM is the value of the spam policy releated with the slider level

        mysql_close($db);


        $out .= "</table>";

        return $out;
At the moment I've 2 problems:
1) I don't know where to find the $ROUNDCUBE_USER, means the email of the user that at that time is using roundcube
2)I don't know where this slider is setting his variables releated with the status (0-10)

Suggestions?
Reply With Quote