![]() |
a bit of code in need of fixing
part of a hack im making:
PHP Code:
i know that Wont work.. how can i change it too make it work |
did you tried:
PHP Code:
|
hmm...
|
theres still the error with this line :
PHP Code:
PHP Code:
|
insert:
echo "warnfield=$warnfield <br>"; echo "bbuserinfo=$bbuserinfo<br>"; before $warnlevel = $DB_site->query_first("SELECT $warnfield FROM userfield WHERE userid='$bbuserinfo'"); and see what your variables have before entering the query. BTW isnt it the variable "$bbuserinfo[userid]" you should use in your query if I got what you're trying to do right? if yes try this: $new_var_323= $bbuserinfo[userid]; $warnlevel = $DB_site->query_first("SELECT $warnfield FROM userfield WHERE userid='$new_var_323'"); Hope this helps.. Regards, Logician |
it seems no matter what i do i get this error:
Parse error: parse error in /home/fiendwor/public_html/admin/functions.php on line 214 Fatal error: Call to undefined function: getuserinfo() in /home/fiendwor/public_html/admin/sessions.php on line 323 |
it doesnt like this code:
echo "warnfield=$warnfield <br>"; if thats not there it doesnt like this code: $new_var_323= $bbuserinfo[userid]; if thats not there it doesnt like the query |
what editor program do you use? Cant you see which line produced the error? I strongly suggest you using an editor that can show you line numbers and then you can easily point which line is causing you trouble. It would be a real headache to trace and fix the problem without even knowing which line causes the problem!
|
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
o and the first line of this bit of code is the reference too the sessions.php
PHP Code:
|
^^
|
if your code gives an error in a line like
echo "warnfield=$warnfield <br>"; then you better check your { and }s This line is a simple PHP code which cant produce any errors, so it is obvious that your problem is something else. Generally wrong use of {}s produce such "awkward" errors and unfortunately they're the hardest ones to trace |
ok.. ill have a look thru my code now thx
|
Lol.. .i dont know how... but all of a sudden my code works...
damn thats amazing.. i just hope the rest of the hack works |
aww....****... i found the problem.. i was looking at the wrong sessions.php file (not the one on my site)
Error= Parse error: parse error in /home/fiendwor/public_html/forum/admin/functions.php on line 214 Fatal error: Call to undefined function: getuserinfo() in /home/fiendwor/public_html/forum/admin/sessions.php on line 323 Here is line 214 on functions.php: PHP Code:
Here is line 323 on sessions.php: PHP Code:
|
parse error is because you missed the $ in the beginning of warnlevel
As for getuserinfo function error well it seems obvious that script cant find your function "getuserinfo". Are you sure it's defined and if it's in another script is it included properly? |
OK what line would work.... if i want too select field10 from the userfield where the userid is equal to the person it displays for
|
^^^word
|
appreciate any help :(
|
Quote:
SELECT field10 FROM userfield WHERE userid=8 so this should work: $warnifield='field10'; $variable1223=$bbuserinfo['userid']; $warnlevel = $DB_site->query_first("SELECT $warnifield FROM userfield WHERE userid='$variable1223'); |
u forgot to close the statement :)
$warnlevel = $DB_site->query_first("SELECT $warnifield FROM userfield WHERE userid='$variable1223'); = $warnlevel = $DB_site->query_first("SELECT $warnifield FROM userfield WHERE userid='$variable1223'"); Anyways... I finally got rid of that error.. so thanks for all ur help i really appreciate it... now i get this errror instead:) Fatal error: Call to a member function on a non-object in /home/fiendwor/public_html/forum/admin/functions.php on line 215 215: $warnlevel = $DB_site->query_first("SELECT $warnifield FROM userfield WHERE userid='$uservar'"); $uservar is instead of variable1223... so i did change it dont worry :) |
Quote:
$warnlevel = $DB_site->query("SELECT $warnifield FROM userfield WHERE userid='$uservar'"); |
gives the same warning.. damn this is getting nowhere lol... where Firefly with his one post fixes... lol
|
dammit.. i see problems being fixed in a day.. this has been ages:(.. there must be some way to do this
|
What happens if you do this?
PHP Code:
|
its not that... the WHERE userid bit.......... The
$uservar = $bbuserinfo['userid'] Dammit it dont recognize that [better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth] |
i said bit not [better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth]
|
Don't you have to SELECT the userid also? Post what you currently have up to this point.
|
All times are GMT. The time now is 06:41 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|