Jump to content

sarahAria

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Posts posted by sarahAria

  1. hi guys

    I want to add usernames from mysq; database to an array like this

    $existing_users=array('roshan','mike','jason');

    mysql table looks like this

    CREATE TABLE `Secure` (`id` int(11) NOT NULL auto_increment,`name` varchar(50) NOT NULL default '',`password` varchar(50) NOT NULL default '',`cookie_pass` varchar(50) NOT NULL default '',`state` char(1) NOT NULL default '0',`mail` varchar(100) NOT NULL default '',`active` char(1) NOT NULL default '0',`actcode` varchar(15) NOT NULL default '',`lastactive` datetime NOT NULL default '0000-00-00 00:00:00',PRIMARY KEY  (`id`)) TYPE=MyISAM AUTO_INCREMENT=1;

    could yu plz help?

    my problem is I don't know about arrays

  2. hi guys I want to prtect my php source code an I need encryption

    but just one or 2 pages and I also don't want to change my php settings for each server like what some encoders applications do can you plz help me

    and also not as easy crackable methods like base64

  3. hi guys I want to prtect my php source code an I need encryption

    but just one or 2 pages and I also don't want to change my php settings for each server like what some encoders applications do can you plz help me

    and also not as easy crackable methods lke base64

  4. hi guys I have an ajax site on hamednet.ir that uses ajax to change content of a div file

    but now when I uploaded it to server(direct admin) it don't work!!

    I already have used a similar version on other hosts with cpanel then it works

    I changed some permissions but no chance of success.

     

    // here we define global variable
    var ajaxdestination="";
    
    function getdata(what,where) { // get data from source (what)
    try {
       xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
      		new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch (e) { /* do nothing */ }
    
    document.getElementById(where).innerHTML ="<center><img src='img/loading.gif'></center>";
    // we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
    ajaxdestination=where;
    xmlhttp.onreadystatechange = triggered; // when request finished, call the function to put result to destination DIV
    xmlhttp.open("GET", what);
    xmlhttp.send(null);
      return false;
    }
    
    function triggered() { // put data returned by requested URL to selected DIV
      if (xmlhttp.readyState == 4) if (xmlhttp.status == 200) 
        document.getElementById(ajaxdestination).innerHTML =xmlhttp.responseText;
    }
    

     

     

    <a href="#" onclick="getdata('change.html','paragraph');">

     

    you can see full code on my site hemdnet.ir

  5. there seems to be an error with array cause even by replacing values with constants nothing changes?!!?

    unfortunately I don't know much about arrays  :'(

     

    $classes_arr = array();
    while ($row=mysql_fetch_assoc($result)) {
        extract($row);
        $classes_arr = array(
            0 => array(
                12 => array (
                'html' => '$program',
                'style' => "background-color: #66CCCC",
                'interval' => '120') ));

  6. I have the data for a class in below table (it's a class schedule and it draws the array on the week array)

    CREATE TABLE schedule(
    program TEXT NOT NULL,
    duration TEXT NOT NULL,
    day TEXT NOT NULL,
    clock TEXT NOT NULL
    );

     

    & I need an array that should be like below (If I write below the array works)

    $classes_arr = array(
        // Classes for monday (day 1)
        $r[day] => array(
                $r[clock] => array(
                    "html" => ".$r[program].", 
                    "style" => "background-color: #66CCCC", // use style property to change the background color
                    "interval" => $r[duration] // set the interval for 2hrs
                )
        )
    );

     

    now I need to put data from sql to the array ND PRODUCE AN ARRAY LIKE above one

    the final code should be like this

    ...
    $classes_arr = array();
    while ($row=mysql_fetch_assoc($result)) {
        extract($row);
        $classes_arr = array(
            $day => array(
                'clock' => '$clock',
                'html' => '$program',
                'style' => "background-color: #66CCCC",
                'interval' => '$duration') );
    }

    but it doesn't work any help? :'(

    thanks Sarah

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.