RussellReal
Members-
Posts
1,773 -
Joined
-
Last visited
Everything posted by RussellReal
-
[SOLVED] convert special phrases to images
RussellReal replied to AviNahum's topic in PHP Coding Help
what I just gave you should work better than what you posted.. -
[SOLVED] convert special phrases to images
RussellReal replied to AviNahum's topic in PHP Coding Help
preg_replace("/<\{img_(\d+?)\}>/", "<img src='\\1.gif' />", $theSource); -
'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
-
Fatal error: Allowed memory size of 33554432 bytes exhausted
RussellReal replied to shergold's topic in PHP Coding Help
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 -
Fatal error: Allowed memory size of 33554432 bytes exhausted
RussellReal replied to shergold's topic in PHP Coding Help
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 -
Check if page is requested by client or server
RussellReal replied to lothario's topic in PHP Coding Help
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'); -
Check if page is requested by client or server
RussellReal replied to lothario's topic in PHP Coding Help
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 -
Help: Creating a simple PHP login with cookies
RussellReal replied to JC99's topic in PHP Coding Help
setcookie -
honestly my javascript shoudl work basically on any form >.>
-
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; } } } }
-
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
-
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.
-
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.
-
[SOLVED] looping through mysql rows, assigning to arrays
RussellReal replied to evanct's topic in PHP Coding Help
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; } } ?> -
uhm.. 'public_dir' => $_SERVER['SERVER_NAME'],
-
[SOLVED] looping through mysql rows, assigning to arrays
RussellReal replied to evanct's topic in PHP Coding Help
try something like this: "SELECT * FROM images JOIN albums ON (albums.id = images.album_id) WHERE user_name = '{$user}'" -
[SOLVED] PHP mail() function with my server
RussellReal replied to Reaper0167's topic in PHP Coding Help
I think in the email you're sending which you're not showing here.. has words like "free", "bank account", "account", "credit card", etc -
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
-
[SOLVED] How do you make an update, then destroy the session?
RussellReal replied to RyanSF07's topic in PHP Coding Help
Anytime bro -
foreach ($_POST as $key => $value) { fwrite($fp, $key.':'.$value); }
-
[SOLVED] How do you make an update, then destroy the session?
RussellReal replied to RyanSF07's topic in PHP Coding Help
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 -
URL displays fine in Chrome, IE8, but not in Firefox 3.0.11
RussellReal replied to ArizonaJohn's topic in PHP Coding Help
link? -
[SOLVED] Alert notification that user's got new message.
RussellReal replied to deepson2's topic in PHP Coding Help
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- -
Function to count number of times a word is repeated in a string?
RussellReal replied to Scip's topic in PHP Coding Help
substr_count -
[SOLVED] Alert notification that user's got new message.
RussellReal replied to deepson2's topic in PHP Coding Help
if ($numOfPrivateMessages) echo "<script type='text/javascript'> alert('You have {$numOfPrivateMessages} new messages'); </script>\n";