Search results

  1. M

    Please help -myphpadmin

    You still need to leave in the close quote tag (" "), otherwise the open quote tag does nothing but clutter up your post. Edit your old message(s) before posting a new one. C'mon, you don't really need my help on this one, do you? Where you you think the username "$username" is coming from...
  2. M

    Please help -myphpadmin

    PDO::prepare, PDOStatement::bindValue and PDOStatement::execute take the place of mysql_query. A PDO tutorial will explain the usage. The part I was referring to was the INSERT statement (which is why I said "Take a look at the SQL statement"): INSERT INTO members (f_name, l_name, d_dob, email...
  3. M

    Have lots of question marks on my web page.

    The problem has nothing to do with the database. You've got a <meta> element that sets the character encoding to "windows-1251". Set the correct character encoding. It's better to send a real "Content-type" header than using <meta>. Since you're using PHP, it's easy to do using the header...
  4. M

    need mysql help

    The second scenario I described in post 14, then. Still need to know about pets.pet_pet_id (not pets.pet_id or pets.id). I'll PM you about this.
  5. M

    Please help -myphpadmin

    You still need to explicitly list the column names in the INSERT statement. Take a look at the SQL statement in post #20. Make sure you leave in the "
  6. M

    need mysql help

    In table "pets", you've got 3 pet ID columns: "id", "pet_id" and "pet_pet_id". "id" is the id for a user's pet, "pet_id" is the ID for a kind of pet (i.e. pets.pet_id references pettable.petnum), and then there's "pet_pet_id"... What's "pet_pet_id"? It's really hard to understand you when you...
  7. M

    need mysql help

    So "pettable" is all the kinds of pets? Would "kinds", "species" or "subspecies" be a better name for "pettable"? As pettable contains the base stats, why does it have a "petlvl" column? Right, but what is "pets.pet_pet_id" for?
  8. M

    need mysql help

    Is a user allowed to have more than one pet? What are the purposes for the "pets" table, the "pettable" table and the "pets.pet_pet_id" column?
  9. M

    need mysql help

    That's not the table structure. Run "SHOW CREATE TABLE tablename;" for each table.
  10. M

    need mysql help

    You can run arbitrary SQL queries in phpMyAdmin by selecting the "SQL" tab, which is between the "Structure" and "Search" tabs in most sections. Select the database and run "SHOW CREATE TABLE tablename;" for each table.
  11. M

    problem with php session

    Whatever you do, please don't use die() and mysql_error(). die() stops output before the page is finished, producing ill-formed HTML. mysql_error() gives too much information to the user, which I mentioned before is something to avoid. The link is to a more thorough explanation of why not to use...
  12. M

    Help with Python Classes

    The module and class names of the pickled object are placed at the start of the pickled string by the base pickler classes (pickle.Pickler and cPickle.Pickler). Your best bet is probably to subclass Unpickler to take optional module and class names. For pickle.Unpickler, override...
  13. M

    need mysql help

    Could you post the table structures (CREATE TABLE statements)? That's fairly necessary info. MySQL doesn't support the "FULL" keyword in the JOIN clause. You can use a UNION of left & right joins, but it might not be necessary. Using a single query to fetch user and pet info seems less...
  14. M

    problem with php session

    Additionally, if a query fails, the result is FALSE. This is why you're getting the "supplied argument is not a valid MySQL result resource" error. Check the result before using it to prevent the error. Whatever messages you print for the user, make sure you don't disclose too much information...
  15. M

    PHP Mail help

    Inside of double quoted strings and heredocs, variables will be interpolated. The OP's code works in this respect; the string concatenation operator (".") isn't needed.
  16. M

    Please help -myphpadmin

    Good focus. Best to not do too many things at once. Altering the table doesn't directly address the problem, which is that there are a different number of columns and number of fields used in the statement . Make sure you explicitly list the column names in the INSERT statement. After doing...
  17. M

    what permissions do I need to use php to write to file?

    When I test createGalleryEventFile(), there aren't repeated entries. Rather than calling print_r on $filewithin the loop, call it on $galleryEventFile outside the loop. The point of print_r is to print arrays.
  18. M

    Please help -myphpadmin

    So login.php leads to register.php? For an INSERT statement, this means the number of columns in the table or columns clause doesn't match the number of columns in the VALUES clause. Whenever you have an error message, google it. You have two extra values in your INSERT statement...
  19. M

    mySQL question about age

    2) PHP Date/Time functions and DateTime class. Unfortunately, many methods of DateTime require PHP 5.3.0, which isn't yet used on the X10 servers. For now, you'll probably have to roll your own using (e.g.) getdate and maybe strptime or strtotime, depending on how you store the date (as Date or...
  20. M

    Please help -myphpadmin

    The string indices in line 82 use double quotes, as does the string they're embedded in. This ends the string early. Change the double quotes surrounding the indices to single quotes. Which page do you end up at, login.php, login_error.php or index.php? It's still not clear what behavior...
Top