Jump to content

the182guy

Members
  • Posts

    611
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

the182guy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. As an alternative, sticking the files outside of the webroot (/www/, /htdocs/) would provide the same functionality without .htaccess This is the best option. If you have files that should only be available after purchase then you'll want them safely stored out of the web root. Robots.txt is no good because only "good" bots will obey it. Evil bots will simply ignore this.
  2. As mj said, you don't need to do any escaping when the email body is dynamically generated from somewhere.
  3. You shouldn't need shell_exec() to resize an image on the server side. Have a search, there are lots of examples using just the core PHP image functions.
  4. To use a background image just use <body style="background-image:url(/path/to/image.jpg);background-repeat:no-repeat;">
  5. You're using this to access data from the record set: $commentrow[3] That is very unreadable, when dealing with a set of fields as you are, use the field name like $commentrow['firstname']. Be sure to use mysql_fetch_assoc() not fetch_row() or fetch_array(). Also, it's a good idea to store small pieces of user information in the session such as first name so you can quickly access those details without having to query the db. Take for example a "Welcome John" sort of message shown on all pages.
  6. Also try keeping your code tidy with proper indentation, this will help you spot these sort of problems quicker.
  7. To change the value programatically you pass in the desired value to .val(myValue), that will then show the corresponding item in the dropdown.
  8. If in doubt about the post data, print it out or view it in firebug.
  9. Store the keys with the emails in a db then when the page is viewed check the key in the query strut against the db.
  10. I would split this up to handle checkout/purchase code into a checkout class and just keep cart relate stuff in the cart class.
  11. Do print_r($thepart) to see what array explode is returning
  12. Write A function in the db class rather than putting a whole while loop on one line of code. A good example of this is Joomla's loadAssocList and loadObjectList functions, which are generic methods for grabbing a whole recordset from any query without having to keep wring the while loop.
  13. Echo out the query and paste it here, or run it through phpMyAdmin.
  14. The only way you can find out if the user buys something from the retailer is if the retailer gives you a sales feed.
  15. Also usleep() if you want to delay execution accurate to less than a second. You might want to send the emails in batches as well with wait in between.
×
×
  • 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.