Jump to content

EKINdesigns

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Posts posted by EKINdesigns

  1. Please let me know what you think about this concept idea.  I think it would be more secure than the normal.

     

    Store the username in a cookie and the password in a session.

     

    Reason this would be more secure:

     

    1.) If someone gets a hold of the session ID they are missing the username (so we assume its a hack and delete the session data).

    2.) If someone, somehow, hacks the session data they are, again, missing the username.

    3.) Someone gets a hold of a cookie (harder since it is located on clients machine) they are missing the password.

    4.) If the users session ends but the username is still in the cookie ask to verify password to re-login.

     

    Please let me know if this concept is a good idea.  I haven't seen this implemented anywhere else.

     

     

    Thanks,

    Jeff

  2. I prefer to secure the information on insertion but format it when I extract it.  I don't like having HTML code in my database.

     

    The nl2br() function is what you want though.  Browsers don't display newlines.  Using this function you convert new lines to break tags which the browser understands.

  3. Grab the value of the drop down from the database the do something like:

     

    <select name="_odometer">
    <option value=""></option>
    <option value="Actual"<?=($row['_odometer'] == "Actual") ? " selected" :NULL;?>>Actual</option>
    <option value="Not Actual"<?=($row['_odometer'] == "NotActual") ? " selected" :NULL;?>>Not Actual</option>
    <option value="TMU"<?=($row['_odometer'] == "TMU") ? " selected" :NULL;?>>TMU</option>
    </select>

  4. <?

    $conn = mysql_connect('localhost','username','password');

    $db = mysql_select_db('database_name',$conn);

     

    $query = "SELECT * FROM months";

    $result = mysql_query($query);

     

    while($row = mysql_fetch_assoc($result))

    {

    ?>

    <select value="<?=$row['id'];?>"><?=$row['month'];?></select>

    <?

    }

    ?>

     

    With the little information I have, try that.

  5. Try in the actual function above.

     

     

    <!--

    function testCreditCard () {

      if (checkCreditCard (document.getElementById('payee_cardNum').value,document.getElementById('payee_cardType').value)) {

        alert ("Credit card has a valid format")

      }

      else {

        alert (ccErrors[ccErrorNo]);

        return false;

      };

    }

    //-->

     

    Give that a go.

  6. Alright...After a few weeks I was able to figure out a lot of the query.  I have only one thing left.

     

    I will re-explain when I am trying to accomplish:

     

    I have 3 tables: forums, topics and users.  I need to select all the forums ordered by ID, I also need a topic count for that forum, and the most recent topic with the user information.

     

    Currently I get everything including topic but it isnt the most recent.

     

    This is what I have:

     

    $query = "SELECT `forums`.{$select}

    , COUNT(`topics`.`id`) AS `topic_count`

    , `topics`.`id` AS `recent_topic_id`

    , `topics`.`title` AS `recent_topic_title`

    , `topics`.`date` AS `recent_topic_date`

    , `users`.`id` AS `recent_topic_poster_id`

    , `users`.`username` AS `recent_topic_poster`

      FROM  `forums`

      LEFT

    JOIN `topics`

      ON `topics`.`fid`

      = `forums`.`id`

      LEFT

    JOIN `users`

      ON `users`.`id`

      = `topics`.`poster`

      WHERE

      `forums`.`cid`='{$id}'

      GROUP BY

      `forums`.`id`

      ORDER BY

      `forums`.`id`";

  7. I am trying to select from 3 different tables: categories, topics, and users.

     

    I need to select all the categories whether or not there are topics in them.  If there are topics i need to get the total amount of topics as well as the most recent one defined my `date`.  I also need to get the users information who posted each topic.

     

    This is what I have so far.  Currently if there are no topics in the category it will only return one category when there are actually multiple.  I also can't figure out how to select the most recent topic information.

     

    SELECT `forums`.{$select}
        , COUNT(`topics`.`id`) AS `topic_count`
        , MAX(`topics`.`date`) AS `recent_topic_date`
    FROM   `forums`
    LEFT
    JOIN `topics`
      ON `topics`.`fid`
       = `forums`.`id`
    LEFT
    JOIN `users`
      ON `users`.`id`
       = `topics`.`poster`
    WHERE
         `forums`.`cid`='{$id}'
    GROUP BY
         `topics`.`fid`
    

  8. i changed the query to this:

     

    SELECT `reciever_id` FROM `invites`(LEFT JOIN `users` ON `invites`.`reciever_id`=`users`.`id`) ORDER BY `users`.`sent_invites` DESC

     

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(LEFT JOIN `users` ON `invites`.`reciever_id`=`users`.`id`) ORDER BY `users`.`se' at line 1

  9. Ok...So i have two tables.  Invites and Users

     

    In the invites table i have the user id which refers to the users table.

     

    in the users table i have the users email address and their total invitations.

     

    I need to order the invitations by the users total invitations and display their email.

     

    Thanks in advance.

  10. If i wanted to distribute a script of mine and wanted to force licenses and such how would i go about doing that?  Should i have their site connect with mine and compare license files with the database?  Any other ideas?

     

    I also plan to Zend encrypt my script as well....bad idea?

  11. Well, i have my site looking perfect in Firefox like always but i cant figure out why it isnt working in IE.  Can someone please look at the source and let me know what i am missing.

     

    Thanks in advance!

     

    Jeff Broderick

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