Jump to content

Spring

Members
  • Posts

    224
  • Joined

  • Last visited

Everything posted by Spring

  1. I don't understand your question
  2. http://www.phpfreaks.com/tutorial/basic-pagination
  3. I got it, thanks! while($row = $db->sql_fetchrow($result)) { var_dump($row); };
  4. So I should loop this? $result = $db->sql_query($sql);
  5. Shouldn't both values be inside of $row though? When I use a var_dump I'm only getting one value? I tried using a foreach, and every result came out with 59.
  6. $sql = "SELECT * FROM table"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $rand_keys = array_rand($row, 6); then loop it.
  7. $sql = "SELECT poster_id from phpbb_posts WHERE topic_id = ".$topic_id." "; $result = $db->sql_query($sql); //same as mysql_query $row = $db->sql_fetchrow($result); // same as mysql_fetch array. var_dump($row); With this code (i commented the query function for you) im getting array 'poster_id' => string '59' (length=2) When I run this into SQL in phpmyadmin I'm getting 59 56 //this is what I want I need to get all of the records, not just the first one. I have even tried using replacing the function with mysql_query and mysql_fetch_array any ideas? It's a bit late, so I may just be making a simple mistake. Thanks!
  8. I fixed this a few weeks ago, sorry for not letting you all know!
  9. is somefile.html in a separate folder than index.php?
  10. Set a root path var. For example: $root_path = http://www.google.com/ require($root_path . 'anyfolder/any.php')
  11. Well yeah, I just didn't know how to approach it, but thanks! (Keeping the function name)
  12. Is there a function which will allow me to throw the values into an array and post them into the DB as separate records? If so a little help would be appreciated! if(empty($row)) { //Need a better way. $sql = "INSERT INTO phpbb_user_items VALUES (13, '$user_id', '0'), (12, '$user_id', '0'), (11, '$user_id', '0'), (9, '$user_id', '0'), (27, '$user_id', '0'), (15, '$user_id', '0'), (16, '$user_id', '0'), (22, '$user_id', '0'), (21, '$user_id', '0'), (23, '$user_id', '0'), (24, '$user_id', '0'), (26, '$user_id', '0'), (29, '$user_id', '0'), (30, '$user_id', '0'), (31, '$user_id', '0'), (32, '$user_id', '0'), (33, '$user_id', '0') "; $result = $db->sql_query($sql); }
  13. It would be an ajax call. You'd have javascript talk to a php file which would check that specific table to see if it's been updated. Afterwards, you'd display a message saying that it has been updated, or display the information that was inserted/updated with ajax. http://api.jquery.com/jQuery.ajax/
  14. Where's your mysql connection?
  15. Just throw a variable into the slider and in the interval? var refreshId = setInterval(function() { $("#container").load('stats.php'); },time); (I didnt download the slider or anything, so bare with me..) time = 800;
  16. The image is showing up fine, but when i does, its black. It's suppose to just be a transparent square.
  17. function buildAvatar(array $imgArray = array()) { $img1 = imagecreatefrompng($phpbb_root_path.'images/spacer.png'); foreach($imgArray as $img) { $img2 = imagecreatefrompng($phpbb_root_path.'avatars/equip_img/'.$img); $this->imagecopymerge_alpha($img1, $img2, 0, 0, 0, 0, 210, 300, 100); } imagealphablending($img1, false); imagesavealpha($img1, true); return $img1; } The background of my PNG was transparent, I don't know what I did, but it's now black! I'm thinking it's the image! Not the code, this same code worked before, and I've tried tons of different ways of fixing it. How should I save the image to work correctly?
  18. My site has had all of it's tables dropped TWICE I CAN'T FIND THE INJECTION, can anyone help? http://www.threechan.org/e/ http://www.threechan.org/e/phpfreaks.txt please, someone help
  19. I'm trying to alow users to reference links, but I'm stumped. $com = preg_replace("/(^|<<)(<<[^<]*[0-9])/", "\\1<a href = #".$com.">#$com</a>\\2</div>", $com); If I typed <<#123 I would get: #<<123<<123 and it would link to <<123 The output I'm looking for is <<#123 and have it link to #123
  20. Thanks guys.
  21. Thanks! Really appreciate it.
  22. Hey sounds good! And yeah, an example would be fabulous!!
  23. My first time writing HTML and CSS from scratch i usually use a free template but i got bored a decided to try it myself, what do you guys think? most link will be broken. concido.tk
  24. Sorry meant to edit not quote..
  25. It's a little difficult for me to explain but, when a website loads another site (For example with Curl or something) How is the site able to keep a header or some part of original site 'attached' to the site they loaded..for example, say you're redirected, the site you redirected to loads, but you still see the site you redirected from header on at the top of the page. How is this done? What is it called? Do you need me to clear it up a bit better? I can try to find an example.
×
×
  • 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.