Jump to content

Gazan

Members
  • Posts

    41
  • Joined

  • Last visited

    Never

Posts posted by Gazan

  1. I want to make it possible for me to view my guests/users activity on my site using session. The problem is, i have to time it out so they arent staying on the same page according to the session, forever. I need to timeout the session, and after that, i need to update the activity database IF the session with the IP is timed out. How do i do that?

     

    Another question, i want to create a mysql search function. on tutorials i've read that you've got to use the LIKE statement in the sql query, but that only results in a complete match of the input, and the result.. Like, i wan't to make it possible for people to type the first three letters of a username, and then the db retrieves the results that matches the request.. Such as, searching for "ph" will give the results "php".

     

    Do i have to explode the results and then.. whoa?

     

    Thanks :)

  2. Alright, thanks for that :)

     

    Also got another question.. If you wan't to create a CMS with an install file. How do you insert the input from the person who's going to set it up as the main mysql_connect details? you store the information in, what?

  3. Hey there.

     

    Alright, i'm a PHP programmer who needs a lesson or two in programming SAFELY (so hackers can't injure). I've got loads of experience doing PHP scripts such as news system and all that.. But i never found out how to really code safely, so hackers can't get around my systems and such. Does anybody have links og anything to tutorials og walk-troughs that explains safe php coding, or can anybody give me some tips on how to code safely?

     

    Thanks

  4. Alright  :D

     

    I'm working on creating my own php forum now, but i got stuck during the show topic page. I'd like to do a while to show the replies, and in the while i would like to show the users profile avatars.

     

      $query = mysql_query("SELECT * FROM replies WHERE topic_id = '".$topicid."'");

      while($row = mysql_fetch_assoc($query))

      {

      $replierid = $row['replier_id'];

      $reply = $row['message'];

      $replierdate = $row['replier_date'];

      echo "

      <table align=center width=420 cellspacing=0 cellpadding=0>

      <tr>

      <td align=left>";

                          $query = mysql_query("SELECT * FROM users WHERE id = '".$replierid"'");

      $row = mysql_fetch_assoc($query);

      $repliername = $row['username'];

      echo $repliername;

      echo "<br>";

     

    Can you tell me why that doesn't work ?

    What im trying to do is to select the user information, in the while.

    Is that just not possible?

    - if so, how do i do it then?

     

    Thanks!

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