Jump to content

taith

Members
  • Posts

    1,514
  • Joined

  • Last visited

Everything posted by taith

  1. just set an autoincreasing row... then you can mysql_query("UPDATE `table` SET `name`='whatever' WHERE `id`='$id' LIMIT 1");
  2. $result = mysql_query($queryMain[0]);
  3. oy... the things people to to try to make trouble... pity servers record everything ;-) you know... if some people put as much effort into helping people as they do trying to break stuff... where you think this world would be?!?
  4. wow... somebody has WAY too much free time...
  5. on $result = mysql_query($queryMain[0], $this->link); scrap $this->link... its completly unnecessary...
  6. the ip's come dynamically from the ISP, however they hold right to them... they all do have an area attached to them... which... indeed isnt infalable... but it would give you the area it comes from, the ISP name, security information, phone numbers, etc...
  7. if you just drop the ip address into a dns server(www.dnsstuff.com) for example, it'll tell you everything you want/need to know...
  8. i have a way of finding out which country their from by ip...? that any use? email me if ya want it...
  9. <? function get_referrer(){ if(!$ref=@$HTTP_REFERER) $ref=$_SERVER['HTTP_REFERER']; return $ref; } ?>
  10. you need to configure "$array[$row[id]]=$row[won]/$row[total]*100;" to your [votes field] and [total field]
  11. might require some improvisation... but i'm sure we can get it :-) <?php $query=mysql_query("SELECT * FROM ratings WHERE which_user = '{$profile_info['username']}'") or die(mysql_error()); while($row=mysql_fetch_assoc($query)){ $array[$row[id]]=$row[won]/$row[total]*100; } sort($array); ?> now you have an $array of all the user id's and their averages... you just need to sort them out... as such... <? $i=0; foreach($array as $k=>$v){ echo $k.'-->'.$v; $i++; if($i==5) break; } ?>
  12. you should be able to access it through material1(num)... no? try print_r($_POST); see if the data is coming through :-)
  13. LOL! it fixes 90% of user input problems ;-)
  14. you dont have to initialize variables in php... $var='test'; $var=1; $var=true; all of which work fine
  15. you'd prolly wanna post this on phpbb's help forum... it has more to do with the forum itself then with programming...
  16. http://us2.php.net/manual/en/function.htmlentities.php
  17. a) addslashes() b) htmlentities() <-- prolly better for this...
  18. not necessary... the POST'ed data is sent along with the form... you dont need any php for form data...
  19. page 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="post" action="page2.php"> <input type="submit" name="Submit" value="Submit" /></a> <input type="text" name="txtusername" /> </form> </body> </html> page 2 <? session_start(); $_SESSION['test']=$_POST[txtusername]; echo $_SESSION['test']; ?>
  20. taith

    Loop

    o...k...? while($row=mysql_fecth_assoc($query)){ if($sk > 0){ echo "<td width=100 bgcolor='$row[colour]' class='navigation'><div align='centre'>$row[VARIABLE]</div></td>"; }elseif($afl > 0){ echo "<td width=100 bgcolor='$row[colour]' class='navigation'><div align='centre'>$row[VARIABLE]</div></td>"; }elseif($lst > 0){ echo "<td width=100 bgcolor='$row[colour]' class='navigation'><div align='centre'>$row[VARIABLE]</div></td>"; } }
  21. agreed... php help... not webhost help... theres tens of thousands out there... pick one :-)
  22. sure ya can... just... while($row=mysql_fetch_assoc($query)){ if(file_exists($row[download_url])){ echo $row[download_id]; } }
×
×
  • 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.