Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. fair comment, but without knowing whether the mysqli library is enabled on someone elses server or not, it's probably better to stick with what flows their boat, rather than yours True that. ... I'm so egoistical :'( lol
  2. cahnge +1 to -1 and see how it goes ( I keep getting confused when working backwards through a string...and with most other things in life..... )
  3. gak, I missed out the /htdocs when I was trimming your url string echo"<img src=\"/wordpress_3/wp-content/plugins/Authors2/jackets/{$row['pix']}\" />"; this time - surely it must work! If it doesn't, please post the FULL url for the page that this code is on.
  4. fair comment, but without knowing whether the mysqli library is enabled on someone elses server or not, it's probably better to stick with what flows their boat, rather than yours
  5. my bad, malformed the code $file_ext = strtolower(substr($file_name, -(strpos($file_name, '.')+1)));
  6. You can't do that. The punctuation isn't the problem, the problem is that you are searching for either '%value%' or 'value%'. either way, your search string doesn't match the value in the table. It's nothing to do with punctuation. e.g. if you had 'Taco Bell' in your database and searched for 'Taco Belle' you would get nothing, nor would you get anything if you searched for ' Tacco Bell' or 'Taco Sell'. This is because the characters you are submiting in the string do not match the characters that are in the same postion in the strings that are already stored.
  7. the comma just before FROM
  8. yeah, looks like it should be spot on. How about trying this in place of it and see what you get? $file_ext = strtolower(substr($file_name), -(strpos($file_name, '.')+1));
  9. That's all about MX records, and nothing about PHP. You will need to set the MX records in your domain admin to use your domain mail server as default. Process varies depending on hosting provider, You would be best contacting them if you are unsure.
  10. I have never seen paths start with ".;" before, is this an XAMP thing?
  11. Out of cuiosity, what do you get if you print_r($file_name)
  12. kind of - but it's non-standard practice, and you would need to be barking to use it in a normal scenrio. $result_set = array(); $resultset = mysql_fetch_assoc($result); foreach ($result_set as $field => $value){ //do what you want to do } using this kind of loop here is so bizzare I don't even know if that will actualy work
  13. what is $file_name? an array or a flat variable?
  14. are you certain that the problem is during the explode and not when the information is actualy being put into the array?
  15. all you wanted to do to the echo was strip the stuff at the start out that you took of the address to make it work: echo"<img src=\"/Applications/MAMP/htdocs/wordpress_3/wp-content/plugins/Authors2/jackets/{$row['pix']}\" />"; should become echo"<img src=\"/htdocs/wordpress_3/wp-content/plugins/Authors2/jackets/{$row['pix']}\" />";
  16. No problem Roy. There are a good amount of people here who can associate quite vividly with this kind of scenario. If you've not been there already check out http://clientsfromhell.net/
  17. what happens when you navigate to http://localhost/Applications/MAMP/htdocs/wordpress_3/wp-content/plugins/Authors2/jackets/****.***[code] where the stars are the file name of a know image?
  18. while ($row = mysql_fetch_assoc($result)){ //do what you want for each row returned } is the normal way of doing this, so long as by iterate you are reffering to running through the returned result set from the query, and not to repeating the query it's self to obtain a specific result set. You see, it's still a bit ambiguous.
  19. To be fair, you shouldn't really let guests add items to a cart anyway - if they want a cart they should have to log in. However, you could run a cronjob on the database that clears out any cart tables that have not been accessed for more than 24 hours.
  20. you're using select * three times (once is bad enough, but three times in a single query is inexcusable) you are aliasing table names for no good reason you don't have a single JOIN in your FROM clause even though you are supposed to have two of them other than that, it looks ok
  21. could you try again, and maybe give us some more info? What do you want to do?
  22. Are you sure your case and path are accurate?
  23. It's not a problem with the explination, it's that you are writing a shopingcart to run through session variables stored in the PHP. That just stikes me as the wrong way to do things. I would have had it run from a database, but that's just me. I think you probably want a foreach(): $total = 0; foreach ($array as $key => $value) { $total = $total + $value; } but I could be way off, I don't use arrays too much.
  24. not sure if it's what you are looking for, bur strrpos() -- http://www.php.net/manual/en/function.strrpos.php -- should be able to help.
  25. I could be wrong, but something about this stikes me as fundamentally flawed...
×
×
  • 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.