Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Uhm PHP can handle OOP. None of that sentence makes sense. You need to either pass the variables as arguments or make them global.
  2. Textpad is also good for PHP, with color coding and indentation.
  3. Close, but not quite. Try: <?php echo '<IMG SRC="'.$row['url'].' ALT="Starflower"> <br><br><br>';?>
  4. Well look at the arguments you're sending and what you expect. You expect: sendmail($fto,$fsub,$fbody,$ffrom) = FOUR arguments. You send: $db->sendmail($from,$email,$subject,$mail_body,$myemail); // FIVE.
  5. $nums = range(1,50); unset($nums[array_search($record1, $nums)]); unset($nums[array_search($record2, $nums)]); unset($nums[array_search($record3, $nums)]); print_r($nums); It should print out the remaining numbers. $nums will now be an array from 1-50 without the 3 records. Edit: of course, array_search is a lot of work for that. You could do a faster version like this: $nums = range(1,50); unset($nums[($record1-1]); unset($nums[($record2-1]); unset($nums[($record3-1]); print_r($nums); Since arrays start at 0.
  6. If there is no action the default is itself. What do you mean by it won't submit? When you click the button nothing at all happens, or when you click it the page reloads, what?
  7. I think you'll have to remove each one using str_replace.
  8. I'm not sure where its supposed to be - you need to indent your code and then you'll figure out where it goes.
  9. Don't you see it? I mean...it's pretty obvious that you have an errant } right there. Are you looking at the code or just posting it here and asking us to fix it?
  10. No problem. Anytime you can't get something to work just simplify it till it does work and you'll find your problem
  11. You have what appears to be an extra } on that line.
  12. That's called "pagination" - google it. There are some tutorials on here about pagination. Apply it to your script.
  13. You don't - just don't resize them if they are too small. Use getimagesize() to figure it out.
  14. Your code was in two different conditional statements. Look. Write this code: <?php $x = 1; $y = 0; if($x==2){ $y = 5; } if($x==1){ print $y; } ?> You can read it and see that $y will be == 0, NOT 5. Now, if you never define $y, you'll either get an error or nothing, depending on your settings. <?php $x = 1; if($x==2){ $y = 5; } if($x==1){ // y doesn't exist! print $y; } ?> This is similar to what you were doing, as far as I can tell.
  15. What do you mean you need pages out of them?
  16. How could it? If you define a variable inside of a conditional statement, and the statement is never entered, the variable isn't defined.
  17. Uhm, do you even know what AJAX is? Put your PHP code on a php page and all it using your javascript code. Mootools.net is a good JS library which has an AJAX class.
  18. If the error is on a line above that code why didn't you post the code it is referring to? We can't help with code we can't see..
  19. Why don't you move the rest of the related code INTO that if? Then you won't get this error.
  20. Uhm, not really, that's the part of the reason to use isset(). It helps prevent those warnings. This code would not generate any errors.
  21. Use $_POST not $_REQUEST. If that doesn't work post the HTML of the form, so we can see what the field is that's being posted.
  22. print $inserter; mysql_query($inserter) OR die(mysql_error());[code] [/code]
  23. http://www.google.com/search?q=php+list+files+in+a+directory
×
×
  • 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.