Jump to content

birdie

Members
  • Posts

    65
  • Joined

  • Last visited

    Never

About birdie

  • Birthday 10/01/1990

Contact Methods

  • MSN
    birdie_is_bak@hotmail.com
  • Website URL
    http://www.warhoundsclan.com

Profile Information

  • Gender
    Not Telling
  • Location
    Birmingham UK

birdie's Achievements

Member

Member (2/5)

0

Reputation

  1. birdie

    while

    Thanks! very helpful :)
  2. birdie

    while

    Thanks that helps. Actually, i am aiming to make a "Did you mean.." part for my search engine. Basically, it also checks for spelling mistakes. It would do this by .. while(num rows are more than 1) { ++ the value for $amount substr($word, 0, $amount) until there are no more rows } Hard to explain.
  3. birdie

    while

    [code] $amount = "0"; while($numrows > '0') { $amount++; $prefix4 = substr($word, 0, $amount); $sql = "SELECT * FROM ctrade_alpha WHERE phrase LIKE '$prefix4' ORDER BY times DESC LIMIT 1"; $query = mysql_query($sql); $numrows = mysql_num_rows($query); } [/code] Hi, i dont usually do while() like this so this is a new one. Any idea why this wont work? Ive saw loops that have code in the while() but i'm not sure how it exactly works? Thanks alot.
  4. Thanks that helps alot, i like the idea of "Did you mean.." because well i am a bit slim on content. I'll definitely overlook the <font>. Thanks again.
  5. Hey, domain is not codetraders.com yet, just need to change my current domain,etc. Anyway.. [url=http://88.104.222.165/beta/codetraders]http://88.104.222.165/beta/codetraders[/url] A search engine that enables users to share scripts/codes. Feel free to register on the test site and just have a little browse around. Points system to help prevent users that just take scripts/codes without giving anything. Points ++ for an upload which is downloaded. Points -- for a download. ps. search "php" or anything like that for my test result. Thanks for reading  :).
  6. oh wow thanks. I should have looked into that more. Sorry.
  7. oh i'm sorry if you miss understood this. I meant any html tags. Div was just an example $var could be.. <table> <div> <br> etc etc.
  8. i'm sorry, i meant var (variable)
  9. hi, i need desperate help because i have never done anything like this in php. My aim is to get rid of html tags from a var. $var = "<div align=center>hell</div>"; i found out that you could use regular expressions but dont know how to use them. I found <([A-Z][A-Z0-9]*)\b[^>]*>(.*?)</\1> which should work (probably). How do i use it exactly in preg_replace or anything else? Thanks  :)
  10. wow, its a good thing php code cannot be inserted into my database then..
  11. hi, i have a problem with using a database to store php information within html text. I would like to know whether there is an easier way than treating it like bbcode. Here is one example.. [code] $sql = "SELECT * FROM table"; $query = mysql_query($sql); $object = mysql_fetch_object($query); echo $object->field; [/code] Say this field had something like this in it.. [code] <html><p>Hello my name is <? echo "Birdie"; ?></p></html> [/code] Any way of echo'ing the information so that "hello my name is Birdie" is displayed instead of an exact copy of the example above? Thanks, i've never figured this out before.
  12. wow thanks for the quick posts, i'll try them all out :-)
  13. Hi, i know $_SERVER['http_user_agent'] provides 'browser' detection but it just doesnt work simply. Is there any way you can basically but this variable or another 1 which can do a relatively similiar action. Example of the script [code] $browser = $_SERVER['http_user_agent']; if(eregi('Firefox', $browser)) { $sql = "UPDATE sitestats_browser SET firefox='$firefox'"; } elseif(eregi('MSIE', $browser)) { $sql = "UPDATE sitestats_browser SET ie='$internetexplorer'"; } else { $sql = "UPDATE sitestats_browser SET other='$other'"; } [/code] Well this doesnt work because there are different versions of firefox. Any help please?
  14. Also, a file may have been included..
×
×
  • 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.