Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. OK, fistly isn't an excuse. It's your responsability - no one elses, just yours - to make sure that you are using any service (online or otherwise) within the agread usage of the provider. You should have checked before spending a week stealing other peoples property off the internet. Secondly : If your tutor has consented to you taking this cource of action in full knowledge that it is against the law, I would very much like to know which educational establishment this person is employed in that would encourage such an action. Thirdly : It sounds like your after more than just the images from the site, but the create input of it's members aswell. I'd suggest you actually contact the website directly and present them with what you are trying to do (just don't open with the fact that you have already stolen 200+ images off their site) and see what support they are willing to give you. Short of that there's not too much your going to get out of the people on here.
  2. it's not overly clear what your trying to do here. what are you using to differentiate between more_data and initial_data? what relevance is the youtube link? what's going on in your php file? p.s. you seem to have a lot of "Undefined Constant"s in your sig...
  3. you should start using console.log() to catch error, rather than alerts, you can access it using firebug in firefox, or in the developer tools in chrome (and probably some way in gimpernet explortr/spartan too). That said, you need to look into the requirements of file upload, either to your own server or to a remote one. see here for the html form requirements. The other thing is you want to be using POST in your AJAX as you are actually posting the file to the uploads.ru site. you also need to set the AJAX headers to the correct data type and then just hadle the display of the link in the success callback.
  4. you shouldn't re-declare the same function multiple times. only declare it once at the start. I don't understand the following: email is the third one, not the last one.
  5. something worth considering may be, rather than going and getting the exact same info back out the database that you just put in there, check the query status of the insert and then recycle your current data in the event of a success.
  6. joel24 is right, there's nothing really wrong with the fiddle, except that your append for the image was a little flakey. I've updated the fiddle with a cleaner append() to show images from a clipart site and changed the display:none to display:inline-block what else are you trying to do
  7. Yes it's ok to view them. No, actually, it's not ok to right click and download them. That's breach of copyright unless you have explicit written permission from the image owner. But here's the thing: most sites know some people will download an image here and there, and it's just let slide because a cost Vs return model makes it unrealistic to go chasing every person that nicks an image here and there - what your talking about is scraping/ripping the site and that's just wrong. It's 99.9% certain that they will have a monitor on traffic volumes and when they see hundreds of megabytes getting sucked down a single IP address, or even the multiple connection streams that will be established, they will bring in their legal guys round and rip you a new one before you can finish checking that all those nice pictures even downloaded. The only thing more <insert word(s) here> than thinking it's ok to activly rip off people for thier photo's just because you want them for nothing (not even the time it takes you to right click and manually steal them) is that you would come on here, advertise the fact and ask people to help you do it. You want free photo's go take them yourself. You want other peoples photo's for free then contact the photographer and make a request - explain your endeavour and take what you get (which in most cases will be nice, generic, "nothing special", "seen that a hundred times already", kinds of images that they know are worth nothing financialy, but will still serve for your claimed purposes).
  8. You know I read that title and thought "Is this really the best place to get help with that?" Having read the rest of the post, you would have been better posting that in the PHP Applications section of the forums as it's specific to an existing system you have changed rather than just being a general coding question. (Also Code tags are a must - especialy when posting that much code - it's too hard to read without them)
  9. To make a closer facsimile of the type of array you get back from a db query you would probably want to have more along the lines of: $car = array(); $car[] = array('sCode'=>'vw', 'name'=>'volkswagen'); $car[] = array('sCode'=>'tyta', 'name'=>'toyota'); Then you can do the following: if(!isset($_POST['???']){ $return = ""; } else{ foreach($car as $key=>$row){ if ($_POST['???'] == $row['sCode']{ $return = $row['name']; } else{ $return = ""; } } echo $return; You should be using a get request, not a post request as you are getting info back from the server, not posting anything to it. Also I strongly suggest using jquery for ajax calls, it makes the whole coding much easier so you can quickly spot things like missing data variables being passed into the xhtml request...
  10. Can't be "God" because he himself coudn't do it...will need to be something more skilled and powerfull than him....hmmm. Answers on a postcard?
  11. The ajax request doesn't interact with the database, the PHP script does that and then generates an array that is then passed back to the ajax request (normaly in the form of JSON). so ajax doesn't care where PHP gets the data, just as long as there is a valid response sent from the PHP script, the core data can be hard coded into the PHP, read from a text file, come from an XML file, loaded in from a database, whatever really.
  12. have you tried using a var_dump() or print_r() on your $keyvals array to see what's actualy in it at each index?
  13. If you have such complex filtering that MySQL really can't do it then your DB structure is seriously screwed. Show us your filtering logic, I'm sure Barand would be able give you the MySQL equivalent without much sweat.
  14. well that makes a lot more sense! [1]user---[1]shoppingcart--<[many]products is perfectly logical - but you were talking about having [many]shoppingcarts and hat was just weird. Did you look at the code I posted in my last reply?
  15. PDO is generic, and I'm not seeing this repetition you're talking about. you are attaching different variables to different place holders with each line, that's not repetition, that's just the job. PDO is already an abstraction, why do so many people think it's a good idea to layer another abstraction on top of it?
  16. I know nothing of asp, so I can sympathise with your position. However, you should know that PHP is a server side scripting language - it has no interaction with the user or the number of times they click. you would need a client side language for that, like javascript or actionscript. PHP can handle the file interaction (loading links from file / appending links to file) and can present an html form to the user - but that form will still need to be sent back to the server for PHP to interact with it again. so you're either talking about submitting the page and it's contents to the server each and every click to have PHP re-process it, or you need to include some of the client side stuff as well. I know on the surface it seems like it should be a 5 minute job, but assuming it still takes someone the same 30+minutes it takes you, for many of the people on this forum coding is their income, so if you are expecting them to take the time to produce code on your behalf, they will expect remunerated for the effort.
  17. I, like the others that have posted here, just don't get what you're doing here. That should worry you (more that they don't get it than me, but still...). So i'm not sure if it's at all relevent to what you're looking for, but you can do simmilar to the following: $product = array('prd'=>"product1", prdetails=>array("detail1"=>"value1"..."detail[n]"=>"value[n]")); array_push($_SESSION['products'], $product);
  18. your looking for the freelance board
  19. Way to get help... Curious though why is PDO exempt from your "class execution only bu calling it in code" rhetoric? How is using a singleton at all an example of a good programmer? Why even bring it up here if you have another "on topic" thread to discuss it? I was typing this as your last post came up....really dude ? Are you here for help or to start a pissing contest? Somewhere, at somepoint you are going to call that marvelous "create a magic connection to my database" class, at which point you will open up siad class object the same way you did by calling the PDO class. Anyway, to answer your "PHP question" here - you don't need to do anything. No one is forcing you to program, although I get why you would fall into such a socialy removed passtime as this with an atitude like yours. The options are there, use what you feel happy using upset's you the least, and don't come on forums and behave like a big boy stole your ball and it's all our fault just becuase you get chalenged on something.
  20. try making a url variable and echo it back: $url = "babyNameDetails.php?".$babyNameSerialized; echo $url; echo "<a href=\"{$url}\">{$name}</a>"; Then on the receiving page stick in print_r($_GET) and see what's sent over Also: ONLY ONE THREAD IS REQUIRED, POSTING MULTIPLE DUPLICATES IS AGAINST FORUM T's&C's (not to mention it upsets people...like me....and discourages those people from helping you)
  21. Going to need to see a describe of your tables please.
  22. ...HTTP request failed! HTTP/1.1 403 Forbidden Makes me think that you (or more specifically your script) are not authorised to access that page. Make sure the permissions are set right on the target.
  23. I'm with Psycho, nothing about what you're doing makes me think AJAX. At most iframe's could get the effect you are looking for, but if it's not broken, why fix it?
  24. If it was working, and no longer is then it's probably not the code, unless it was changed as well. First place to look is on the hosting servers file system. Check that the php file is in the same folder as the file that is running the xhtml request. Then check that the permissions are right on file and folder. I assume your hosting provider provides php hosting...
  25. I agree, I don't think "what's the best" is an accurate question when it comes to code editors/IDE's. What is a feature to one group can be a pain in the backside for another. I don't think that there is a universal right answer, although there may be, I have used a pitiful number of applications to code in. I do like it simple myself, and have been prone to using PSPad for a number of yeas now. I drifted into using eclipse for a little while, but setting up workspaces and projects was too much of a pain in the backside after a while and I just gave up. I also couldn't be bothered with the load up time of starting eclipse every time I wanted to go in and do a bit of coding. I have just recently started using an IDE/editor called CodeLobster, and I have to say, I'm quite liking it. It doesn't suffer from PSpads single most infuriating habit of auto closing absolutely everything as soon as you open it. i.e. you type a double quote and instantly you have two on the page, one in front of the cursor, and one behind. It drives me nuts. Code Lobster also has an integrated debugger - which I haven't trued yet, but if you set up your webroot it lets you preview pages in a single click, without having to change window and hit f5. Like other environments it lets you change the color theme in as few as 4 clicks (choices include all the popular editors), offering a preview of how each theme looks on each type of code (CSS/PHP/HTML/etc.). All in, it's shaping up to be a pretty polished bit of software. The basic version is free with the option to spend a nominal amount to upgrade to lite or a bit more to get pro. I was going to go into the differences but read through it and it looked like a rather shameless advert, so I deleted it and I'll leave it there.
×
×
  • 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.