Jump to content

spiderwell

Members
  • Posts

    1,008
  • Joined

  • Last visited

Everything posted by spiderwell

  1. anything is possible really , but first off i would ask the site if they have an API you can plug into or some kind of xml feed? alternatively you will want to fetch the page, and parse it appropriately to get the data you need with get_file_contents()
  2. php and mysql = pretty much anything you want from a website
  3. so where does this leave you? are you after assistance or not?
  4. I would say you have answered this yourself, you need to seperate out these 2. Look again what you are passing into the $iterator array, and make sure you only pass the parent to it? without seeing that part of the code, I cannot be sure what is in that array. Also in your SQL you are asking it to return parentname as node, and categories as parent, which only adds to confusing me more! and maybe you?
  5. will mark is solved once I have heard back and been able to check
  6. yeah it came up NULL, and dont have permission to change the global, will be contacting the hosts right now thanks for your help
  7. dont sweat it, we all start somewhere. as stated echo out the statement to see what it actually is is also a great debugging help
  8. try localhost instead of the ip address, also use phpmyadmin to check the user accounts and privledges match up
  9. also looking at your code and error it might well be that you have characters in your form inputs that might be breaking the SQL statement, such as ' or ` etc. it is very bad practice to put form data directly into an sql statement, thats how sql injection is done. at very least put a mysql_real_escape_string() around every $_POST[]
  10. hi all, i wrote an event for a client's database that is supposed to run once a day, but having checked the database again, it doesnt seem to be occuring, essentially what it does is clear out a row's info and reset it to a 'for sale status' from 'on hold' if its been on hold for more than 2 days. what it does is working fine, its when it does it that doesn't seem to be working correctly could anyone confirm for me if i have correctly structured the part that makes it run once a day every day. many thanks CREATE EVENT `checkonhold` ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY ON COMPLETION PRESERVE DO UPDATE `tbl_sales` SET `Sales_Status` = NULL, `Sales_Hold_Date` = NULL, `Sales_PrintRequired` = NULL, `Sales_Date` = NULL, `Sales_User_ID` = NULL, `Sales_GalleryDelivery_Date` = NULL, `Sales_RetailPrice` = NULL, `Sales_Currency` = NULL, `Sales_EuroRetailPrice` = NULL, `Sales_ArtistPercentage` = NULL, `Sales_GalleryPercentage` = NULL, `Sales_CommissionOther` = NULL, `Sales_ClientName` = NULL, `Sales_GalleryDiscount` = NULL, `Sales_Billed` = NULL WHERE `Sales_Status` = 'Hold' AND `Sales_Hold_Date` < date_sub( CURRENT_TIMESTAMP , INTERVAL 2 DAY ) AND `Sales_User_ID` <> 2 also would there be any logs on mysql to show it is run daily, so i can further check this
  11. php and mysql work very well together, practically every dynamic content website will use these 2 together, or if its asp it would be microsoft sql. you dont need to learn very much sql to achieve what you want with a Q & A application.
  12. jquery can more than likely do it!
  13. username is not part of the FILE variable, but seperate, perhaps you are looking for name? to get file name. and because it doesnt exist the move file, becomes just a directory, as the file name isnt on the end location replace all $_FILES['uploadedfile']['username'] with $_FILES['uploadedfile']['name'] might fix it
  14. if the text file is on a webserver, it could be fetched and read in php using file_get_contents()
  15. php is one language, and asp is another, the 2 really dont mix. you could easy store in a text file, using a delimiter to seperate Q from A but then you lose handy functions that databases can easily be used to do, like sorting, filtering, paging and so on. I am sure you could recreate that with a text file, but why reinvent something when you dont have to.
  16. assuming the Q&A are in a database, using pageination (think thats the right term) and set record limit as 1 row per page. the form could have hidden value for next page number and when form posts to itself, you know which page is next (i.e next question) and show that, as well as of course checking the current question and answer. there might be alternative methods but thats what came to me when i read your post
  17. I cant imagine how, since search engines never see the raw PHP script, only the finished pages when served from the web server.
  18. thats how I would do if it was me, but don't take my method as gospel. something along the lines of how you stated should be fine and in the processing code, if value == 0 then skip update.
  19. paypals ipn info is here https://www.paypal.com/ipn it allows a passback page, which means you can get info back from paypal in a posted form of hidden inputs, and in there should have the advert id passed back, and that should be enough to trigger a delete action on your site. you instruct paypal which page to passback to on successful payment.
  20. add the . concatenator to $message should do it, thus each loop will add to the message string as events are looped $message .="<p><span style=\"font-size:24px\">$event_title</span><br />$eventdate</p><p>$event_description</p>";
  21. put the include file into its own folder and add an htaccess file that prevents users from calling the file via the browser, and makes them only able to be called by scripts on the server
  22. only dont go to w3schools as they are not at all associated with w3c and are often giving out incorrect information. but thats a whole different story altogether
  23. i think to get the new value after an UPDATE you will need to do a new SELECT. but i'm not 100% on that
  24. yes you would get the same thing at the end. its a technique to prevent errors in your code with undefined variables. its down to personal preference, but really its better to catch potential errors than not, even if you know that $_POST is going to be there. you dont have to do it, just like you dont have to do many things in code, but in a professional environment, it would be expected to write code that is covering any possible errors that might be thrown.
  25. why not just echo out $page_views instead
×
×
  • 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.