Monkuar
Members-
Posts
987 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Monkuar
-
my code: echo $Profile['display']; ECHO's out: 0|1|0|1 Now I want to explode these, which is easy $display = explode("|", $Profile['display']); But Now I want to use a php function to check if any of the array's = "1" and have the value set to $value= "checked"; I could do this by doing if ($display['0'] == "1"){ $value = "checked"; } and then 1 2 3 and so on.. but I want a faster way, maybe a for loop, or a simpliar easier way to just check if each array = 1, make $value = checked Possible right?
-
wow i feel like aturd thank you topic solved sometimes my brain just farts
-
if ($ibforums->input['display1'] == "1"){ // }else{ $std->Error2("You're being Nawty!"); } Ok, this works fine. If they submit anything other then "1" for that input it shows "you're being nawty" but I want it to beable to be anything besides 1 or 0 so I added if ($ibforums->input['display1'] == "0" OR "1"){ // }else{ $std->Error2("You're being Nawty!"); } and it still let's me submit anything...... i only want my $ibforums->input['display1'] to accept 1 or 0 as a input!!!! I don't want any hackers submitting other input values for this field! any help?!
-
WOW I FIXED IT DUDe FINALLY members1.name as to_name,members1.star,members2.name as from_name WOW TOPIC RESOLVED DUDE THANK YOU SO MUCH :Dddddddddddddddddddddddd I guess I just needed to add the "AS ETC" THANKS SO MUCH BRO
-
Hey, it's working now but I don't want to walk away from this seeming like I am just asking for help just "cuz" I want to actually learn this stuff. Which your query helped me greatly. now the problem is, how do I echo that out so I can differentiate between my to_id and from_id's ? This is how i echo it out in php <a href=?i={$r['to_id']}>{$r['name']}</a> That will show me the name and link them to there to_id, (which is there profile) Then for from: <a href=?i={$r['from_id']}>{$r['name']}</a> it's the same thing, but it's showing up weird here: See it's almost working now! But that to_id should have the username "Newman" hence that is id #1 from ibf_members, but it shows the id from 25 instead which shows the user id of 25's name which is "theDoctor" sorry this is really prob pissing you off, but this stuff has been bothering me the past 20hours and I have no where else to go
-
holy monkeys mySQL error: Unknown column 'ibf_members.id' in 'on clause' This is weird, man sorry for the trouble
-
I get mySQL error: Not unique table/alias: 'ibf_members' Seems fishy why would it think it's not unique?
-
my ibf_members only has 3 columns id name star should i re do my query but use ibf_members as the main 1 and LEFT JOIN the gold_logs? try that? i am really stumped it's almost working, it SHOULD work when i use the ON clause cause essentially i just want it to pull the name off ibf_members to correspond to each to_id and from_id....
-
wont work because of the where id = 1 and it would show 3 rows instead of my 2 i just need to left join my column to_id and from_id to the column ID from ibf_members iuno this is so hard, i must need to read more mysql @_@
-
While this is good practice, it is only for ambiguity purposes, and this case in particular it will not affect the outcome. OP, simply join the table using the from_id. The where clause will control your main table. SELECT gold_logs.*,name,star FROM gold_logs LEFT JOIN ibf_members ON gold_logs.from_id = ibf_members.id WHERE gold_logs.to_id = 1 1 Problem Using your query my results come out: Problem is, the name should not be the "the doctor" because it's not id 1, any idea on the fix? it should be the name of the whoever ahs user ID 1 in ibf_members
-
This does the same thing as before, shows no information? The problem is to_id = 1 from_id = 5 So that means user with a id = 5 sent 200 Gold to to_id 1 (user id 1), Now I just need to left join both those columns (from_id/to_id) on ibf_members, so I can extract the name of EACH user.
-
all i am doing is trying to left join my column row "to_id" and "from_id" i can successfully left join to_id but once i try to add "from_id" to the "ON" clause it makes all my data blank SELECT gold_logs.*,name,star FROM gold_logs LEFT JOIN ibf_members ON to_id = ibf_members.id WHERE to_id = 1 That query works fine, but when i try to add my "from_id" column the query works with no error's but no results are shown SELECT gold_logs.*,name,star FROM gold_logs LEFT JOIN ibf_members ON (to_id = ibf_members.id AND from_id = ibf_members.id) WHERE to_id = 1
-
if ($r['parent_id'] > 0) { $this->children[ $r['parent_id'] ][$r['id']] = $r; } else { $this->forums[ $r['id'] ] = $r; } what is this code doing? i don't get it how it uses the 2 variables in the " [ " " ] " 's ? weird? $r is a simple select * from a query.. i dont get the 2 variables with [] right next to each other?
-
is there any available for me to enhanced on /etc? How would I go about starting 1 i want 1 with 32 numbers and i need to have to run a query every 1hour how would i go about this?
-
if ($indovina!=$indovinata) { if ($tentativi>=6) { echo ("\n<p>Sorry, you hanged yourself. The word you had to guess was: ".$indovina."</p>\n"); } else { $scelt = preg_split('//', $scelte, -1, PREG_SPLIT_NO_EMPTY); echo ("\n<p>\n"); foreach ($alfabeto as $lettalf) { $contrl = false; foreach ($scelt as $lett) { if (!strcasecmp ($lettalf, $lett)) { $contrl = true; } } if ($contrl) { print (' <img src="images/lr_'.$lettalf.'.gif" style="border:0;width:20px;height:20px" alt="'.$lettalf.'" />'); } else { print (' <a href="'.$_SERVER['PHP_SELF'].'?letter='.$lettalf.'"><img src="images/lb_'.$lettalf.'.gif" style="border:0;width:20px;height:20px" alt="'.$lettalf.'" /></a>'); } if ($lettalf=='m') echo ("\n <br />"); echo ("\n"); } echo ("</p>\n"); } } else if ($indovinata){ echo ("\n<p>Congratulations! You guessed the word.</p>\n"); $DB->query("UPDATE ibf_members set gold=gold+5 WHERE id = {$ibforums->member['id']}"); } Look at the bottom, ok so if the person wins the hangman game, it will show "Congrats" but then people will just beable to refresh the page, and that query will run again and again and that person will gain +5 gold each time....we need to fix this!! any help?
-
$mystring = "|Signature"; $findme = '|'; $pos = strpos($mystring, $findme); echo $pos; echo's 0 supposed to echo out 1....? why not work thanks How can I enable it to check for | using strpos?
-
well im trying to spit them out by explode with , but theres going to be to many if's
-
Code: PostInfo,color-main,Newman,not-collapsed;Friends,color-main2,Top Friends,not-collapsed||Twitter,color-main2,Twitter,not-collapsed;Signature,color-main2,Signature,not-collapsed;AboutMe,color-transparent,About Me,not-collapsed Now I want make a function like if PostInfo = "not-collapsed" = do this/etc, So simply, how do I extract some content out of this and then use each thing to equal to if it's 'not-collapsed' or 'collapsed' ? Very hard but i think possible? ty
-
document.REPLIER..value=q?"09":"03"; I need to add so it works in my document value form for some reason it's not accepting this? Do I need to add backslashes if so how?
-
I believe you can do this though: foo.php?x%5Bfoo%5D=bar would allow you to get $_GET['x[foo]']; But I know you wanted it all for looks, but thats a no-go on looks IMO. eh i'lll just use my file name .php for now.. thanks tho php should add this future!!
-
thats what i wanna do with my input help? :shrug:
-
I want to do this because it would look awesome as a site url decoration.. I have my index.php set to [i].php and edited my apache config to read that as index and it works fine why cant i add the [ ] brackets to the input? im sure ican there has to be a way, lol
-
i have my file name .php and i want to use $_GET['[u]']; and I Want tobeable to use &[u]=XXXX on my site
-
need to add $ibforums->input['[u'] != "") something like that i need to add $_GET['']; but it's not working when i use &= do ineed to use html entities?
-
$ibforums->input['to'] = str_replace("$", "\$", $ibforums->input['to']); I FIXED IT!! YES Thanks!!! Topic Resolved!!