Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. what I just gave you should work better than what you posted..
  2. preg_replace("/<\{img_(\d+?)\}>/", "<img src='\\1.gif' />", $theSource);
  3. 'op' is not getting POSTED thru a form or w.e is goin on on the page.. and you are trying to pull from a table concated thru values that you'd get from a table, so ofcourse there is an error.. you're trying to pull from a table named something like: 'firstName lastName' but you're using fields instead of static text.. also you're3 not actually SELECTING anything.. coz you just used SELECT FROM not SELECT * FROM
  4. idk your code isn't showing me much I can help you with ... Sorry, post more code post the code from each of the pages you include and then I can help you more
  5. maybe inside 1 of the included pages, it includes the same page.. and so it keeps including including till its allowed memory is all used up.. OR! You could be throwing yourself into a loop and filling an array with never ending data.. it takes alot to get to that limit
  6. sessions will work the same way.. you'd do the define something like this.. // whatever php includes files define('in_script',$_SERVER['PHP_SELF']); // whatever php you want to ONLY be included if (!defined('in_script')) die('you have no access to this file');
  7. you mean tell if it is being called thru an include or thru a request? in the first page you could define a constant define and then in the page you're trying to figure out if included or not.. check defined for whatever constant you specified. if the constant exists you're including, if it doesn't you're getting the page requested
  8. honestly my javascript shoudl work basically on any form >.>
  9. function ref() { var e = document.getElementById('form1'); for (i = 0; i < e.childNodes.length; i++) { if (e.childNodes[i].tagName.toLowerCase().match(/(?:input|select|textarea)/)) { if (!e.childNodes[i].value) { alert('Missing Fields'); return false; } } } }
  10. add me : RussellonMSN@hotmail.com I'll help for free.. Sorry for that unneeded extra info, I got reprimanded for 'advertising'.. the reason I want you to add me, is there is no demo of whats wrong, and its kinda hard to visualize this.. Anyway, add me or not its you call, however, maybe post some screenshots here
  11. calendar? Thought Box? Some kind of converter.. E.G. Kilometers to Feet, etc. view counter? maybe with a sexy little graphic and php gd? btw this will be moved to miscellaneous, or general discussion.
  12. Ok.. Obviously that wasn't a great post on my part, just email me if you want some help.. My email is in my signature, and there is an Add to MSN button in my user info panel to the left. however, if you want to receive help here.. you'd want to post some code or something.
  13. oh I see what you wanted.. I figured 1 query would do better for you than two queries.. but here you go.. <?php $q = mysql_query("SELECT * FROM albums WHERE user_name = '{$user}'"); $a = array(); while ($b = mysql_fetch_assoc($q)) { $g1 = mysql_query("SELECT * FROM images WHERE album_id = '{$b['id']}'"); $currentRow = ($a[] = $b); $currentRow['contents'] = array(); while ($b1 = mysql_fetch_assoc($q1)) { $currentRow['contents'][] = $b1; } } ?>
  14. uhm.. 'public_dir' => $_SERVER['SERVER_NAME'],
  15. try something like this: "SELECT * FROM images JOIN albums ON (albums.id = images.album_id) WHERE user_name = '{$user}'"
  16. I think in the email you're sending which you're not showing here.. has words like "free", "bank account", "account", "credit card", etc
  17. okay.. your query looks fine, the problem is in the while loop you keep overwriting the same variables.. try this: <?php $DB->query("SELECT * FROM ibf_logs WHERE receiver_id = {$ibforums->member["id"]} && month = '$month' && year = '$year' or sender_id = {$ibforums->member["id"]} && month = '$month' && year = '$year' order by id desc"); if ($DB->get_num_rows()==0) { echo "No Logs for you - I'm fixing this and Working on it. Dont worry, lol."; } else { while ($item = $DB->fetch_row()) { if ($item['sender_id'] == $ibforums->member["id"]){ $grabTwo = ($item[receiver_id] == Store ? "" : mysql_query("SELECT * FROM ibf_members WHERE id = {$item[receiver_id]}")); $getReceiver = ($item[receiver_id] == Store ? "" : mysql_fetch_array($grabTwo)); $nameFrom = "<a href='?showuser={$ibforums->member["id"]}'>" . $ibforums->member["name"] . (isset($ibforums->member["desktop"]) ? "<img src='{$ibforums->member["desktop"]}' </a>" : "</a>"); $nameTo = ($item[receiver_id] == Store ? "Store" : "<a href='?showuser={$getReceiver["id"]}'>" . $getReceiver[name] . (isset($getReceiver[desktop]) ? "<img src='{$getReceiver["desktop"]}'</a>" : "</a>")); } else { $grabThree = mysql_query("SELECT * FROM ibf_members WHERE id = {$item[sender_id]}"); $getSender = mysql_fetch_array($grabThree); $nameFrom = "<a href='?showuser={$getSender["id"]}'>" . $getSender[name] . (isset($getSender[desktop]) ? "<img src='{$getSender["desktop"]}'</a>" : "</a>"); $nameTo = "<a href='?showuser={$ibforums->member["id"]}'>" . $ibforums->member["name"] . (isset($ibforums->member["desktop"]) ? "<img src='{$ibforums->member["desktop"]}'</a>" : "</a>"); } $to = $nameTo; $from = $nameFrom; $amount = $item["amount"]; $time_date = $item["date_time"]; $message = $item["message"]; $this->output .= $this->html->showlogz($to,$from,$amount,$time_date,$message ); } } ?> I just moved the showlogz into the while loop and made it append, tell me how much luck you have
  18. foreach ($_POST as $key => $value) { fwrite($fp, $key.':'.$value); }
  19. ok.. when you try to destroy the session.. you havn't started the session.. so you get an error. and then THAT error, sends your headers.. so session_start() can't actually start correctly
  20. YourNameHere, you are barking him up the wrong tree.. my post gives him the correct answer, all he needs to do is fill $numOfPrivateMessages with THE NUMBER OF TOTAL PRIVATE MESSAGES WHICH R NEW.. and the if statement should work.. and echo the html and the alert fine-
  21. if ($numOfPrivateMessages) echo "<script type='text/javascript'> alert('You have {$numOfPrivateMessages} new messages'); </script>\n";
×
×
  • 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.