Jump to content

dzelenika

Members
  • Posts

    229
  • Joined

  • Last visited

Posts posted by dzelenika

  1. <p>Which of the following best describes your religion:<br>
    <select name="religious">
    <?php
    $arr = array(0 => "Non religious", 1=> "Christianity", 2=> ...);
    foreach($arr as $key => $val)
    {
      echo '<option ' . ($key == $religious ? 'selected="selected"' : "") . 'value="' . $key . '">' . $val . '</option>'
    }
    ?>
    </select></p>

  2. what about?

     

     

    $rs=mysql_query("SELECT tblbusiness.*, tblsub.* FROM tblbusiness JOIN tblsub WHERE tblbusiness.category = tblsub.subsec AND tblsub.catid='$view' AND tblsub.subsec = '" . $rs["subsec"] . "'");

  3. if you try with:

    $filename = $_FILES['sel_file']['tmp_name'];

            $handle = fopen($filename, "r");

            while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)

            {

    print_r($data);

            mysql_query("INSERT INTO user SET id = '".$userid."', name = '".$data[0]."', email = '".$data[1]."', phone = '".$data[2]."'") or die(mysql_error());

            }

        fclose($handle);

     

    what is the output?

  4. I think that using MySql security is bad idea you should create user table, file table and user's group_file connection table eg;

     

    user table:

    id

    name

    login

    pass

    group  (admin, editor, proofer, journalist ...)

     

    file table:

    id

    filename

     

    file_group table

    file

    group

×
×
  • 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.