Jump to content

veridicus

Members
  • Posts

    121
  • Joined

  • Last visited

    Never

Everything posted by veridicus

  1. veridicus

    div fade

    I recommend script.aculo.us. Take a look at the visual affects it can easily do.
  2. I would probably append new records to a tab delimited txt file accessible over the web. Then download the file periodically import into (and update) your Access database. MySQL's not the right storage method if you can't easily access it when you need it.
  3. I always store images in the file system. Along with the pros and cons you mention, there's the lowering of overhead by letting apache directly return images from the file system. My IMG tags typically point directly to the image files on the system, skipping PHP and mysql processing. The images are always named with a consistent naming convention, usually a string describing the type to relate to a table and the ID (e.g. product-123.jpg), so I don't even need a field in the DB to know where the image is. The PHP simply generates the paths. I find this to be best for performance. For large sites I use algorithms to store images in various directories. For the largest site I've worked on with millions of pages, storing images in the database would have brought the replicated database servers to their knees.
  4. How "live" does the data need to be? Because you're going to run into some serious performance issues. You could peform one-time or periodic dumps of the MySQL database and import them into Access. Why do you need Access to get to data from your MySQL server?
  5. Your statement above the echo should look like $insert = mysql_query(...) or die(...); The die isn't an independent statement in this case. And at one point your mysql_query() call was missing the right parenthesis. If all of the parens are closed and the semicolon is there you still get an error? Because the only other possible syntax problem would be quoting, but those look OK.
  6. I should also mention you never want to insert POST or GET data directly into your database. At a minimum you should wrap them in mysql_real_escape_string... mysql_query("INSERT INTO $table (user_name, password, email) VALUES ('" . mysql_real_escape_string($_POST["txtusername"]) . "', '" . mysql_real_escape_string($_POST["txtpassword"]) . "', '" . mysql_real_escape_string($_POST["txtemail"]) . "')") But you should probably do some data validation first (like no spaces in passwords, valid chars in username, etc.) So check POST and GET for security and data validation.
  7. You're also missing a parenthesis. $insert = mysql_query("INSERT INTO $table (user_name, password, email) VALUES ('" . $_POST["txtusername"] . "', '" . $_POST["txtpassword"] . "', '" . $_POST["txtemail"] . "')") or die ("Could not insert data because ".mysql_error());
  8. You can find a reference with some examples relating to HTML at DocForge
  9. You could make a symlink to the file from your web directory to your user directory. Then apache needs to be configured to follow symlinks (which can be done in .htaccess). Or you could have a PHP file which catches requests and "manually" starts the download for the user. It would sort of be a filter which you can control with code. If you go this route just make sure the account which apache/php run under have read access to the file.
  10. Every statement needs to end with a semicolon. You should have one at the end of the die statement above the echo line.
  11. What you've written catches /action/xyz/ and redirects to index.php. I think what you want is something like RewriteRule ^([^/]+)$ index.php?action=$1 [L] RewriteRule ^([^/]+)/(.*)$ index.php?action=$1&step=$2 [L]
  12. Define garbage. Is it malformed HTML? Or an error?
  13. The short answer is that you can't use custom fonts. If you just want to show your users what the font looks like create an image. The long answer is that there are a few ways around the limitation. One of the best I've seen, but only when used in a limited amount, is to use a flash media file. You embed the font and then during page rendering pass it the text. There's at least one good commercial one around, but I can't seem to find it at the moment.
  14. Your selects have IDs but your JS is looking for elements by name. Your form elements should have both (name for form submission and ID to grab them with JS). Then use getElementById.
  15. What exactly isn't working? Is the form not posting or is the JS not performing the check properly?
  16. If the only purpose of UserItems is to join the other two tables together, then there's no need for it to have its own unique ID. Whether it has an ID or not, you should place a unique index on UserID, ItemID.
  17. Generally I recommend storing images outside of the database. Store the path to each image on disk.
  18. I realize you want to build it from scratch, but you may learn a lot if you search for an open source project that already does something similar. Altering it for your own needs can be very educational.
  19. At most I find one out of every ten digg stories interesting, so I don't bother with it any more. I stick with Slashdot and SeenOnSlash
×
×
  • 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.