Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. You can use extends if you want to invoke methods from another class. class pca_inventory extends db_manager{
  2. I'm not sure where you were using () to assign the variable when in your first post you said: Please show us the 2 different "styles" you're referring to.
  3. 1) The first variable after the URL should be '?' which it is, everything after that should be separated by '&'. So this; Should be: 2) When comparing use double equal signs (==). Use singles for assigning. So this: if ($type = "gallery"){ should be: if ($type == "gallery"){
  4. *inserts exact question into Google...* Oh look, found a possible solution to your question. Right here. Was only 1 - 10 of about 14,200,000. (I think the last post in the link provided was actually posted by a member of this forum)
  5. any suggestions? Yes, you should take a look at Database Normalization.
  6. Create a resource directory for your images and just store the paths for them in the database, wherever needed.
  7. Well, PHP will only echo out HTML to move the image. Could you show us your code?
  8. Maq

    classes

    I would recommend drawing up a classes diagram of what you think is right and what you're trying to do. Check out some existing designs that are similar to yours so you can base your off it. If you have questions you can post it for feedback. It's hard to say what exactly you should do when we don't know how complex this is going to be. Good luck!
  9. Maq

    classes

    Why in the world would you make a class to echo? Could you explain exactly what you're trying to accomplish? You would most likely put both in 1 class but again, you need to explain what you're trying to do.
  10. That's what urlencode does, along with all the other necessary replacements.
  11. Well you're always setting $id = 1. Take that line out and see if the correct $id gets passed through. You should echo out each place where the id is supposed to be read and passed to ensure that it's correct, or even there...
  12. At least it was SELECTing and not DELETing
  13. I added some debugging lines in so you can check to SQL statements. You were also using the @ symbol which suppresses the error messages. Change these lines: $id = '1'; $ok1 = @mysql_query("DELETE FROM ".$tbl_name." WHERE id='".$id."'"); to this: $id = 1; $sql = "DELETE FROM $tbl_name WHERE id='$id'"; echo $sql; $ok1 = mysql_query($sql) or die(mysql_error());
  14. If it's returning something then it's a valid SQL statement. Like rhodesa said, check against the script connection and the actual database to make sure you're connecting to the correct one. Make sure you're looking at the correct table. You mentioned "the entire database" but you're only looking in one table (stock). There's not much more we can help you with unless you post a some more relevant code.
  15. Check your names. You use different names for the same thing. For example you have: $EmailID=$_request['EmailID']; and Change the input one to EmailID and it should work, but double check all of them. Why would you have a bang in the name anyway? Your method is also POST, so you should use POST, although the REQUEST should still work. And use [code] tags please.
  16. Looks like you're not passing anything because your form does not have an action or method. How do you want to decide what value of usrEmail to pass through? Do you want to wait to see what option the user picks from the usrID SELECT menu first? I think I'm just a little confused as to exactly what you're trying to accomplish...
  17. Ben is right, sorry professor gethinw you're wrong...
  18. There's no need to have a nested class. That won't even work. You're supposed to use extend, which is what it was created for. Or, if you need an interface, you use implements.
  19. I'm not sure of any specific ones that I can recommend, but there are plenty of packages that you can use for graphs. I also think a member here, "Barand", create one himself, baaChart. It's from 2003 but may have been updated, anyway just something to look at.
  20. Anyway, your function doesn't do anything even if the syntax was correct. You have return; as the first line so it will go into the function and return right away...
  21. Maq

    Auto?

    I think I may have only answered part of your question. You would have to strip off the integer value from RPA and one it. You can ++ a string but when it reaches the max digit it will add a letter to your RPA.
  22. Only when you don't do it properly - 2 * apple != apple's Sorry, I couldn't help myself... Thanks professor gethinw. I'm a software developer, so my grammar skills are little to none. Besides, that stuff is for QA.
  23. Maq

    Auto?

    Try this, I added some error checking and altered your SQL: $sql="SELECT * FROM pilots ORDER BY date DESC LIMIT 1"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result); $a = $row['username']; echo "Last User: " . $a;
  24. If you want to learn OOP than I would suggest doing a different exercise. Have you checked out phpfreaks OOP tutorial? PHP OOP
  25. Actually need a quote right here: $dbtable = "Application";
×
×
  • 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.