Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. $Email=vEmail; Once again - is this your REAL code? Because this is never going to send mail.
  2. If you didn't spot it before, the syntax highlighting provided by the forum should make it obvious.
  3. It means your query failed, you need to be checking for errors with mysql_error() before trying to use the result of a query.
  4. That is an awesome picture. $system is not defined within the context of that function. You said when you comment out line 18 you still get the error? I can only assume it changes to a different line number? Because you have $system->check_mysql in 3 places there, but $system is never defined.
  5. Images are files, and should be stored as such. In the filesystem.
  6. <?php $myArr = array(); $myArr['test']['testing'][1] = "dont find me"; $myArr[1][2][3] = "test"; $myArr['one']['two'][1] = "foo"; $myArr['one']['two'][2] = "bar"; function getArrKeys($arr, $value, $existingKeys=NULL){ if(!$existingKeys){ $existingKeys = array(); } if(is_array($arr)){ $key = array_search($value, $arr); if($key !== FALSE){ $existingKeys[] = $key; }else{ foreach($arr AS $k=>$a){ $key = getArrKeys($a, $value, $existingKeys); if($key){ $existingKeys[] = $k; $existingKeys = array_merge($existingKeys, $key); return $existingKeys; } } } if(count($existingKeys)){ return $existingKeys; }else{ return FALSE; } }else{ return FALSE; } } print '<pre>'; print "Foo "; print_r(getArrKeys($myArr, "foo")); print "Bar "; print_r(getArrKeys($myArr, "bar")); print "find me "; print_r(getArrKeys($myArr, "find me")); print "test "; print_r(getArrKeys($myArr, "test")); ?> Results: Foo Array ( [0] => one [1] => two [2] => 1 ) Bar Array ( [0] => one [1] => two [2] => 2 ) find me test Array ( [0] => 1 [1] => 2 [2] => 3 )
  7. How do you want it to behave if the value exists at multiple "locations" in the multidimensional array?
  8. Where is that section of code within the file? If it's inside of another if() you need to see if that's processing.
  9. Images are files, and should be stored within the filesystem.
  10. I think what you're looking for is "pretty urls" with modrewrite. you have one profile page, and it takes a parameter like the user's name. But the URL just has their name, not the page that does the processing.
  11. I have to ask why you're having a form post to a .css file?
  12. Do you have error reporting turned on? The syntax is: if(isset($_GET['search'])) { require_once('header_2.php'); } else { require_once('header.php'); } So your code should generate at least one error.
  13. Well I don't mean the whole page, I meant the relevant section, but I said the wrong thing I'm wondering what the errors are.
  14. Again, if you're expecting an integer, just cast it as an integer. You don't need to do anything else with it. By the way, this is not help on demand. Not getting a reply within 20 minutes is not a reason to bump the thread. Most of us have jobs and families, and I am caring for my 6 month old son while working. The rule on this forum is no bumping threads.
  15. It means that since you are only expecting either nothing or 1, don't bother stripping tags, etc, just cast it as an int.
  16. Your checkbox has no value, so I think it would only return true, in which case you can just cast it as an int and be fine.
  17. What are the names of your inputs? They should match exactly.
  18. If you had run it on a Sunday, I think he's saying the wrong sunday comes up. You could probably determine what day of the week it is using date('l') (in which 0=sunday), then determine from that how many seconds to subtract from the current time to get the last week Sunday/Monday or whatever day. Not saying this is better, just what I would try next if the "last week" isn't working.
  19. You should always post the solution, so other users who search the forum for similar topics can utilize it.
  20. If you look at your actual output, you should see the problem. View the source in your browser. You also have some php code not in php tags.
  21. Are you putting that query in quotes? Post the whole code.
  22. After you process the information, redirect them to a different page to display the results.
×
×
  • 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.