Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Vertically, as in the images go vertically and the text goes horizontally?
  2. Error pages are handled specially so as long as they don't require something that could fail (like PHP) then they'll work. Static HTML, possibly with server-side includes, will work fine.
  3. That output looks right to me... You know you're looking at it after it's been parsed and reassembled by the browser, right? If you want to see the actual output of the code you have to do a View Source.
  4. = is for assignment, == is for comparison.
  5. Slow down. Make sure you have a solid understanding of what you've seen so far. You'll impress him/her more by knowing a single concept solidly than by knowing a small amount of many subjects. [edit] Really. When I see programmers who know one topic very, very well then I'm impressed they've learned so much about it, especially since today's web development has so much focus on being able to do everything. The problem is that while developers know about a number of concepts and have a general idea of everything, truth is they're not really good at any one thing. It's easier to introduce a new concept to someone and let them explore the depths of that then to have to make them unlearn bad information and practices that they picked up trying to rush through the subject matter.
  6. 1. Rename the to "sendto[]". 2. $grID will now be an array. 3. Change the regex to (be a little simpler and) look like '\\\.(id 1|id 2|id 3|...)(\\\.|$)'If the IDs selected were 1, 10, 15, and 99 then the regex would be '\\\.(1|10|15|99)(\\\.|$)'You can basically implode() the $grID but you still need to validate that each thing is a number.
  7. So if it works then what's the problem? You've got a few minutes after you post to make edits, but beyond that you should make another reply. Helps make sure that people don't see one version of your post, start replying to it, and then in the middle you go back and make some important change that totally screws up what they were going to say.
  8. So there's currently two problems: 1. You're searching on the last keyword. Because you put it in $search2 and overwrite that for every keyword. Only the last one will stick. 2. To get the count do SELECT COUNT(*) FROM table WHERE whatever conditions you haveThe table name and the conditions are the exact same as in the regular query; the only differences are the COUNT(*) and not using the ORDER BY (doesn't matter) and LIMIT (you want to count everything).
  9. First things first: have you tried searching with more than one keyword?
  10. What do you get when you also var_dump($_SERVER)?
  11. Ah, the joys of denormalized databases. "REGEXP '\.{$grID}(\.|$)'"First a period, then the number, then either another period (another group follows) or the end of the list. [edit] Your example uses periods but your regex uses commas?
  12. That's right: it's a SQL query. Your ==NULL and =="%" and strlen() checks on it don't make any sense.
  13. Do you know what the $search2 variable even is? Read the code and see what value it actually has.
  14. if ($_FILES['creature_image']['error'] == 0) {
  15. Right. Now repeat that for every substring. SELECT * FROM table WHERE field REGEXP 'test1' OR field REGEXP 'est12' OR field REGEXP 'st123' OR field REGEXP 't1234'(And since all that does is check string contents a LIKE might be better.)
  16. The SELECT query retrieves all the data you want to insert into the other table; the WHERE would be part of that.
  17. ...and are missing a few of them (on the same line). Gotta have them between strings and variables just like you do between strings and strings.
  18. 1. Write a SELECT to get the data you need. Make sure it only returns the `location` (and possibly `dis`?) values. 2. Stick an INSERT INTO years at the front. Might need a column list in there too, as in (location) or (dis, location).
  19. As I said in the very first reply to this thread, which you clearly didn't read,
  20. It counts up from 400 and never ends? The for loop will keep running as long as $second for ($i = $second /* the lower number */; $i
  21. Sure, but that doesn't really explain what it's supposed to do. Are you trying to output the answers along with the questions? Every question has a matching answer, right? From the form. Question #23 has a corresponding answer #23. Get that #number using the key of that $question array you're looping over, then look up the answer to match.
  22. And the code you have now will do that... as long as you've actually filled in those ___s.
  23. Then that thing in $_GET is empty(). No way around that. Could be missing, 0, or an empty string.
  24. Okay, I can't find anything which prohibits you from doing this. What data are you trying to get and in what form?
×
×
  • 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.