Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Ok, that was totally irrelevant and unnecessary. This is a PHP Help forums, not Twitter, which we all know that CV loves oh so much.
  2. Try opening it up in VIM or notepad to see what's actually there. If you have a question about editors and encoding I would suggest Editor Help.
  3. Sorry, that doesn't make any sense to me.
  4. Hey everyone starts somewhere, and we're here to help. Try to implement what Ken has suggested and if the error remains or a new one pops up, post back with the correct info (exact errors and relevant code). There are also IDE's and sites that will automatically format your code for you.
  5. It's syntactically correct, but you should echo it out before that line to ensure it has the correct value. Seems to me your link, or your variable, should be: Enter (relative to your path)
  6. Yikes... Talk about format and indentation. Makes debugging, coding, hell, makes everything easier. Please surround your code with tags as well.
  7. What do you mean exactly? Like this? $title = "This is my title"; echo "$title"; ?>
  8. That's good to hear. I went to your site and it brought me straight to the home page without going through the disclaimer (enter/leave) page. We also can't help you without and code and proper information. NOTE - Be advised of Forum DO NOT's #3.
  9. Seems to be custom error checking. Can you show this bit of code that would display that message?
  10. Maq

    HCwDB

    Lol. I think I'd have to achieve the "hot chicks" part before I can get to the douche bag bit... Well if you achieve the "hot chicks" part, then what would be the reason to turn into a d-bag? The whole point is that these bags dress up like this to get the hot chicks, and it really chaps my ass. Makes me want to punch small children.
  11. When I go to that URL I brings me directly to the "Enter" and "Leave" page. Is that correct? Assuming it is, when you click on enter you'll notice that it tries to direct you to .. This most likely means that you have a path issue in your "Enter" link.
  12. That's great to hear. Do you mind posting the final code in case someone else runs into a similar problem.
  13. Maq

    HCwDB

    Haha I would definitely agree. I think the funniest part of the site is the comments by the creator himself (douchebag1), he's very creative. Is anyone from L.A.? I would love to hear if these dbags are all over the place and if anyone has ever had a close encounter with a douche. Damn right, she looks extremely tasty. Yes, the narrator wrote a book that is all about this issue. Basically it's about how this is turning into an epidemic and spreading wildly. The bag is in all of us, we must resist and overcome it.
  14. It's always the small things. I believe the word OUTER is optional. So LEFT JOIN === LEFT OUTER JOIN. that's good to know, I was never much of a MySQL guru. I usually go with the trusty LEFT JOIN, but I really should do some more research and tests with the various joins.
  15. I see. I believe you can do this with a single query. Assuming you want to filter out the list of bots from the field, "ip", you can utilize the NOT IN clause. The syntax may be a bit off as I have not tested it, but I have left comments in the code. I also included 2 debugging statements, so if my syntax is incorrect, it will give you 'descriptive' error messages. ini_set ("display_errors", "1"); error_reporting(E_ALL); $botlist = array("a","b","c"); $botlist = implode(",",$botlist); $sql = "SELECT * FROM your_table WHERE ip NOT IN('$botlist')"; $result = mysqli_query($sql); // Not sure if you need the single quotes around $botlist $num_no_bots = mysqli_num_rows($result); echo $num_no_bots; ?>
  16. Shouldn't you be using a plain LEFT JOIN, rather than an OUTER?
  17. You can actually just do this all in one page. It will make things a lot easier, especially validation and readability so you don't have to go from script to script. A couple things I noticed/fixed: You weren't properly escaping your data, which in turn could result in a security issue. Learn to use mysql_real_escape_string. The query was being executed, unconditionally, with blank information, resulting in your blank entry issue. I submitted your data to the same page for the reasons stated above. There is no error or validation checking. I'm not sure if you got to this or not but users could enter blank, duplicate, or potential invalid usernames that would have otherwise been successfully INSERTed into your database. Cleaned and formatted your code a bit. include "connect.php"; if(isset($_POST['submit'])) { $password = md5(mysql_real_escape_string($_POST['password'])); $avatar = mysql_real_escape_string($_POST['avatar']); $username = mysql_real_escape_string($_POST['username']); $myspace = mysql_real_escape_string($_POST['myspace']); $join="INSERT INTO admins(username,password,avatar,myspace) values('$username','$password','$avatar','$myspace')"; mysql_query($join) or die("Could not join" . mysql_error()); //insert post print "You have registerd, login."; } print "</pre> <form name="'form'" action="'register.php'" method="'post'">"; print "Your name: "; print " "; print "Password: "; print " "; print "Avatar: "; print " "; print "Myspace: "; print " "; print "</form>";<br><br Hope this helps, good luck.
  18. Maq

    My 100th post!

    I give, please... no more hyperlinks! This guy is hilarious... I love angry individuals.
  19. It may be because when you load the page the insert will get executed and when you submit it gets executed a second time. What is 'register.php'?
  20. Try echoing all the variables out to see if they are successfully being assigned.
  21. Maq

    My 100th post!

    lol... That was pretty quick, do you keep that bookmarked for frequent use?
  22. Can you post the relevant code that handles the image being clicked.
  23. Maq

    My 100th post!

    Come on, I rub yours, you rub mine? (pun intended)
  24. If you have 2 arrays and want to filter out one of them, you can perform array_diff on them. i.e. $botlist = array("a","b","c"); $array = array("a","b","c","d","e","f","g","h","i","j","k","l","m"); print_r(array_diff($array, $botlist)); ?> (After reading your post again, I realized this isn't what you really wanted, but I will leave it up cause it may pose usefulness) Sorry, I'm confused about what you're talking about. Can you explain exactly what you want to accomplish?
  25. Maq

    My 100th post!

    I love your logic, makes perfect sense! You're also missing out on the funniest/most bizarre posts from CV. Well, I guess I am too... :'(
×
×
  • 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.