Jump to content

waynew

Members
  • Posts

    2,405
  • Joined

  • Last visited

Everything posted by waynew

  1. I hacked the site using notepad.
  2. Bump
  3. I have three columns. The first is the primary key id. The second two columns are what I'm interested in. [/td] 20 827233677 734812262 14 734812262 827233677 The example above shows "a match". Basically, what I'm looking for is to be able to select only the rows that have an opposite. i.e. row #20 has 827233677 in col_a and 734812262 in col_b. row #14 has 734812262 in col_a and 827233677 in col_b
  4. Rule #1: It has to be easy for others to spell. Pixodo could be Picsodo etc.
  5. There are tools out there that can do all of this for you, just so you know.
  6. There's content copyright and design copyright.
  7. To stop SQL injection I would advise you to use a function such as mysql_real_escape_string(). $username = mysql_real_escape_string($_POST['username']); $result = mysql_query("INSERT INTO user(username) VALUES('$username')") or trigger_error(mysql_error());
  8. If that "deleted" data (i.e active=0) could be useful later on, just mark it as inactive. If it's data that won't be useful later on, just delete it.
  9. waynew

    Friends

    Anyone?
  10. It's the only version i'll use. Comes with XP, stays with XP. I'm not going to download a 300MB clone attempt of firefox and opera's tabs. No way. That's all good and well. Just don't get annoyed when you see that websites show like shit in it.
  11. waynew

    Friends

    Thanks for the reply. I had to modify your SQL. The query I'm using is: $select = " SELECT * FROM friendship LEFT JOIN user AS u_1 ON friendship.user_a = u_1.user_id LEFT JOIN user AS u_2 ON friendship.user_b = u_2.user_id WHERE friendship.user_a = '".$user_id."' OR friendship.user_b = '".$user_id."'"; Your original one was scolding me about aliases and "user" not being unique. The above query is doing the reverse of what I want to do, which means I must be kind of close. Basically, it's looping out only the owner's name and not the name of his friend (I know for a fact that this owner only has one friend).
  12. waynew

    Friends

    Thanks for the reply. My main goal is to show the user details of those who are friends with the person's profile I'm viewing. Also, is it nec. bad that I have friendship_id as the primary key? I have an index on both the user_a and user_b cols.
  13. waynew

    Friends

    I've a query that I can't seem to get my head around. Basically, I have two tables: user friendship The table user holds all user related data. Its primary key is called user_id. My friendship table looks like this: Say for example, I visit somebody's profile. I'll get to see his or her friends. The problem is, his or her user_id could exist in either user_a OR user_b, hence the reason I'm having a problem in joining the friendship table with the user table.
  14. I'm guessing that you're trying to make a quick buck via Amazon Affiliates? What I do recommend is that you focus on a geographical area with your keyword marketing. Nobody is going to Google for "Bubba".
  15. If you want help, I suggest that you act a little less sassy with the people who reply to your thread. If this credit card processing website expects you to store passwords etc in plain text, you need to find a different company to do business with. They most likely have further documentation. I suggest checking their site out or even contacting them/using their support forums.
  16. waynew

    PHP no nos

    HTML Tidy adds so many newlines though! You see, I usually use single quotes when generating HTML, so it would probably look like this for me. <?php while($row = mysql_fetch_assoc($result)){ echo '<img src="'.$row['img'].'" alt="Image" title="Image" />'."\n"; } ?>
  17. waynew

    PHP no nos

    You could use a HTML tidy program if you really needed to. I just think they look ugly.
  18. waynew

    PHP no nos

    I think it makes it look less readable. Maybe it's just me. I like my variables to stand out.
  19. waynew

    PHP no nos

    I never use heredoc. Usually, I do something like this: <?php //people using mysql_fetch_array when they obviously don't need it //also bugs the hell out of me while($row = mysql_fetch_assoc($result)){ include("html/newsitem.html.php"); } ?> Then in newsitem.html.php <tr> <td> <img src="<?php echo $row['img']; ?>" alt="<?php echo $row['colname']; ?>" /> </td> <td> <?php echo $row['colname']; ?> </td> </tr> I never add "\n" etc to my HTML. IMO it's not worth it.
  20. waynew

    PHP no nos

    $select = mysql_fetch_array(mysql_query("select * from user where username = '$_POST[username]' and password = '$_POST[pass]'")); echo $select[someKeyWithoutQuotesThatIsntAConstant]; You just made me rage.
  21. waynew

    PHP no nos

    People assuming that POST values exist. The use of addslashes for escaping dangerous characters. People not using exit(); after their redirects. I'll stop now.
  22. I made one too. I had the help of specialised software:
  23. waynew

    PHP no nos

    <?php mysql_connect("localhost","root","") or die(mysql_error()); mysql_select_db("myDB"); $pass = addslashes($_POST['password']); $username = addslashes($_POST['username']); $select = mysql_fetch_array("select * from user where username = '$username' and password = '$pass'"); if(mysql_num_rows($select) > 0){ header('Location: cp.php'); } else { die('LOGIN INCORRECT PLEASE GO BACK'); } ?>
  24. I use http://www.jgraph.com/
×
×
  • 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.