Jump to content
xisto Community

bigfatme2000

Members
  • Content Count

    35
  • Joined

  • Last visited

Everything posted by bigfatme2000

  1. Searching with PHP and MySQL is pretty easy when you think about it, especially if you're doing it the simple way (without boolean or whatever) It consists of a few forms, a query and an output. As I said, simple! <form name=\"form1\" id=\"form1\" method=\"post\" action=\"<? $php_self ?>\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><td style=\"text-align: center;\"><input name=\"search\" type=\"text\" id=\"search\" /></td></tr><tr><td style=\"text-align: center;\"><input name=\"submit\" type=\"submit\" id=\"submit\" value=\"Search!\" /></td></tr></table></form> The form that you just made contains a text input that people will type into, the next code will extract the form data and then search it.. Form processing $search = htmlspecialchars(addslashes($_POST[\\\'search\\\']), ENT_QUOTES); if(isset($_POST[\\\'submit\\\'])) { if(!$search) { echo \\\"No search entered, please go back and fill in the fields properly.\\\"; } else { $query = mysql_query(\\\"SELECT * FROM table WHERE field LIKE \\\'%$search%\\\'\\\"); $resultnum = mysql_num_rows($query); // Just print $resultnum if you want to show how many results returned if($resultnum>0) { // Echos out matches if anything was found while($row=mysql_fetch_array($query)) { // Starts spitting out the data echo \\\"You can put a link to the result article here, or something else. This is what\\\'ll show up when a user gets a result, for each result.<br />\\\" } } } } else { echo \\\"<p>No search entered?</p>\\\"; } And that's it. Let me just break this down for you htmlspecialchars(addslashes: This line does two things; it cleans out any chance of an SQL injection to your database, and then it adds slashes to the value which makes the search more accurate. If you don't add slashes, then if you searched for cheese, it would return anything with a c, h, e or s in your database. So much for search relavance, eh? $query = mysql_query(\\\"SELECT * FROM table WHERE field LIKE \\\'%$search%\\\'\\\"): This is the query that does the search. Notice the percentage signs in the LIKE part - don't forget these. They work as wildcards. And the rest I'm sure you'll understand.
  2. My host (which for obvious reasons has to stay hidden)'s php has gone silly!It is running cPanel - and includes are not working - and returning the message 'Access Denied'! Anyway, it isn't the scripting or permissionas i have tried it on another host's account!Any ideas?(That is the reason I will be signing up here on Xisto - its is a good and reliable host - and the moderator 'Dooga' has pointed me here! So thank him! Anyway - back on topic has anyone ever had this?.. Where one minute your PHP is working fine- then nothing works? The host may be using a rubbish server!
  3. Great poems there - well done! I wish i had talent - well i can sing in the shower (but we won't go there )Anyway, back on topic lol, good work - do we have permission to use that poems on the loves in our lives? I personally think they all are very good - and imaginative. You obviously have deep personalities!
  4. Hello I know this is a little different, but I was talking to a friend a day or two ago about this girl he really liked. He realy likes her, and he think she likes him too. But The point is, she LIKES ME!!!!! I like her more than a friend - so we both like each other. Although he is my best friend, and I don't want to hurt him.What should I do?.. Break the girls heart - or hurt my mate? I would apreciate your comments
  5. Anyone else have this problem? I used to be able to use rapidshare fine - only the past day or so, its done this!!!! Firstly, I am not downloading anything, and the weird bit is - it's not even my IP address!!! Not using a proxy either or anything! I have read somewhere it might be somthing to do with my ISP? Ah well, no rapidshare for me!
  6. These theme parks do do well - it just gets me to the fact why they need to charge so much - i mean they must make a mint!
  7. We have all waited a long long time for the PS3 - and it is gonna be so costly coming out, most of us won't be able to afford one for a long time anyway. As we have waited such a long time - im sure we can wait another few weeks or something. As for all this, it may all be false. Big companies like sony wouldn't announce a release date for such a big thing, without leaving enough 'Safe time'. I bet they finished the PS3 last year - and are just testing it now. I wouldn't worry Whoever said that they will only sell a couple of thousand - HAHAHAHA This is getting released wordwide - they will sell Billions during its lifespan! I prefer PlayStation - but does this really mean it is the best console?.. Is it just that it is the most popular?
  8. I agree with you on that one! There are many videos doing the rounds - and almost every console is getting destroyed in them! A PSP getting bricked, or a virus thingie on the DS. I cannot wait until the PS3 comes out - i don't think ANYBODY will pay all that money - and then brake it! PS3 are gonna cost loooaaadddds. I was chuffed with my PSP though - Ive never owned an XBox - and wouldn't want to either! PLAYSTATION RULZ.
  9. Thats all too true for ny liking. All we can do is hope one doesn't come around here - a black whole is the center of an exploded star.... or so i read! There aren't any around us (or that we have found) - so we shouldn't get too worried.
  10. Eww, thats horrible! I used them before the ACORN computers! I don't like Macintosh... They will never be better that windows - a pc is only hated by more people, because it is used by more people in the first palce! My mouse has 5 buttons - and i wouldn't be able to survive without all of them!I mean how would you get used to one button? - It isd so small you would have to use glasses to find it in the dark.I dissagree with this invention - Apple should stick to being just a fruit - as they are an insult to technology!
  11. I voted McDonalds - their Double Cheese Burgers are to die for!
  12. Grr - you are right - thanks for making that clear to me - much apreciated!
  13. What will end first?... Earth or the universe?.. This might seem a silly thing - but think about it - what will it be? They are thinking today that they may of got it wrong about the start of the universe - the stars may be going further apart - but is the universe coming closer in Hey - we can't get to the outside of the universe - so we don't know what is happening - we could get squashed like.. NOW Oh no.. i hope not - not until after christmas anyway Notice from cmatcmextra: Moved from What Is..?
  14. A very nice and clean template - cool! I like the advertise column - and the cute login box at the top - nice!
  15. GTA is one of the best, and fastest growing game and is going to be a big hit this Christmas.Which is your favourite? You remember the shock and suprises we had while we un wrapped San Andreas, well imageine a great improvement GTA:LCS is going to have on GTA 3 and just think - what will the PS3 bring for GTA - (Or should i say what will GTA bring for GTA ) - with blue-ray disks and all that!
  16. Yeah - thanks very very very much - This is well needed, and will go to great use on the next version of my website - thanks!
  17. Every wondered which search engine will find the result you are looking for? Well search two of the most popular with this handy little tool! http://forums.xisto.com/no_longer_exists/ Its rather cool lol
  18. Now i have been looking, and was wondering if anyone recommends a certain make for the Christmas gift off my family - a laptop.I want quality, and good for money. I am considering HP - and NO WAY dell! Have any of you guys got any recomendations?
  19. Want a brill idea?... Well the other day i got http://forums.xisto.com/no_longer_exists/ Notice from rejected: Please put all copied materials in quotes, thanks.
  20. That site is nicely put together THANKS FOR SHARING!
  21. Yeah - I was using rapidleecher for a while (I blame dooga for that! ) and then uninstalled it! Thankyou VERY much - you have kinda solved my problem - many thanks!
  22. I was using these for about a week, made a lot of money (thank god for window hiders ) anyway - then I read somwhere they don't pay out, and ban you by making false alegations!Is this true?.. Or shoud i continue using them?
  23. This guy is too right - they are all cons! Good ones i must admit!
  24. Thats all music to my ears! I mean google are MUCH better than Microsoft - in almost all ways. I feel sorry for GMAIL, havong to change their name due to some childish company not allowing them to use that name! Also, imaging google brought out their own Operating system - i mean with the technology of today - they could suprise us! I think we will all have to wait on that one lol - great newsthough - who do you think will win the war?
  25. Well whenever i try and download anything from there - they say ' My IP 19.646.465 is currently downloading somthing!'I mean fair enough - ONLY I AM NOT DOWNLOADING ANYTHING! The thing that annoys me also is that it isn't even my IP address! Anyone got a solution to this?.. If not, I might try and sue rapidshare or somthing lol
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.