Jump to content

TOA

Members
  • Posts

    623
  • Joined

  • Last visited

Everything posted by TOA

  1. I'd check the form then, sounds like nothing is being POSTed.
  2. Of the code I saw posted, I didn't see any syntax problems. Does it give you a line number or any other info? Can you post the part of the sript you think is the culprit?
  3. I know what a syntax error is And we can't help you with that. Start digging through your code
  4. Add this to the top of your script and see if anything changes. error_reporting('E_ALL');
  5. Ahhh. Understood. It would depend on where the number is coming from. Can you post some code? There's ways to increment client side, server side, or in the db itself
  6. Beat me to it I'm not much on ajax so I'm afraid I can't help there, sorry
  7. Try this: http://www.phpfreaks.com/tutorial/basic-pagination If I misunderstood what you need, sorry
  8. Code, errors, etc? We can't help with no info
  9. That's exactly what I gave you Put what I posted inside your while loop, and it will put each db name into the names array
  10. Inside the while loop try this: $names[] = $row['friendname']; If I understand you correctly
  11. Look into normalization. If you use the cid as the Foreign key, you won't need to do all this. Example: Course Table Course_ID - pk Course_Name Student Table Student_ID - pk Student_Name Enroll Table Enroll_ID - pk Student_ID - fk Course_ID - fk That way, it doesn't matter if you change the name, the id is the unique identifier Just my 2 cents
  12. That's not very helpful. My apologies if it came off that I was being mean or abrupt; but the rules even say to try something yourself before asking for help. The fact that a google search found his answer is not me being unhelpful, I pointed him in the right direction. (Something you've done to me a few times ) At the very least, some URLs might have helped. Ok, I'll give you that The big thing is understanding when and why. Related info should be stored in like tables. So for your use, you would have a User table and a comment table. Each would have a unique ID (the primary key). The Comments table would hold the User Primary key in it as the foriegn key, linking the comment to the user. That way, if something changes in the user table, it doesn't need to in the comments table and the other way around. Let us know if you run into any snags
  13. Can you post your code?
  14. Look into normalization. It's a big topic, so don't get discouraged, but focus on relationships and primary/foreign keys. I'll whip up an example for you in the meantime
  15. That's not very helpful. My apologies if it came off that I was being mean or abrupt; but the rules even say to try something yourself before asking for help. The fact that a google search found his answer is not me being unhelpful, I pointed him in the right direction. (Something you've done to me a few times )
  16. That would mean the condition in the if isn't being met. I have no idea what language that is or what those are supposed to mean so that's as much as I can tell you
  17. You don't have a FROM in that last query, might be an issue, but probably not the one you started the OP about
  18. Google it, i found several that can answer your question. Then come back and we'll help you
  19. Please use the forum code tags The way you have it, it will print no matter what. I would add some error handling. (The reason it was saying "Thank you..." even with an error) Also, add or die() for testing $connection = mysql_connect (localhost, predwine_test, jazz77); $db = mysql_select_db (predwine_test); $sql = "INSERT INTO contacts (contactType, Name, Address, City, State, PostalCode) VALUES ('$ContactType', '$Name', '$Address', '$City', '$State', '$PostalCode')"; $query = mysql_query ($sql) or die(mysql_error()); if (!$query) { print ("ERROR"); } else { print ($ContactType]); print (" "); print ($Name); print ("<p>"); print ("Thanks for your submission."); } Try that and let me know if it helps; it's not tested and just what I noticed at first glance
  20. Have you tried anything? Like adding another join onto your first attempt?
  21. Ahhhhhhh. You need pagination... There's plenty of tutorials here at phpfreaks and also on google. They'll be easy to find. Basically you set an offset and use LIMIT to return what you want. Look into it
  22. No, it says to get all(*) from images where approved is equal to one. That's what you said you wanted
  23. The OP's form is correct also. See here Add these lines to the beginning of your script and tell us the error ini_set ("display_errors", "1"); error_reporting(E_ALL);
×
×
  • 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.