Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
[SOLVED] how to show errors with php that appear on my browser
Maq replied to justAnoob's topic in Javascript Help
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. -
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.
-
Sorry, that doesn't make any sense to me.
-
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.
-
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)
-
Yikes... Talk about format and indentation. Makes debugging, coding, hell, makes everything easier. Please surround your code with tags as well.
-
What do you mean exactly? Like this? $title = "This is my title"; echo "$title"; ?>
-
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.
-
[SOLVED] how to show errors with php that appear on my browser
Maq replied to justAnoob's topic in Javascript Help
Seems to be custom error checking. Can you show this bit of code that would display that message? -
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.
-
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.
-
That's great to hear. Do you mind posting the final code in case someone else runs into a similar problem.
-
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.
-
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.
-
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; ?>
-
Shouldn't you be using a plain LEFT JOIN, rather than an OUTER?
-
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.
-
I give, please... no more hyperlinks! This guy is hilarious... I love angry individuals.
-
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'?
-
Try echoing all the variables out to see if they are successfully being assigned.
-
lol... That was pretty quick, do you keep that bookmarked for frequent use?
-
Can you post the relevant code that handles the image being clicked.
-
Come on, I rub yours, you rub mine? (pun intended)
-
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?
-
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... :'(