Wrong Parameter

Started on the old forum in July 2008 · view the original in the archive · old links redirect here

9 replies · 750 views · started 18 years ago · 1 min read

3 participants
Guest #1

I'm getting the following error, in scotspaul coding can anyone help please

Warning: Wrong parameter count for mysql_result() in /home/*****/public_html/galleryreal/cat.php on line 36

the cat.php is

header("Cache-Control: no-cache, must-revalidate"); include("../config.inc.php"); header("Pragma: no-cache"); header("Content-type: text/vnd.wap.wml"); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; echo "<wml><card title="$cat">

";

$Connect = mysql_connect("$server","$user","$pass"); mysql_select_db("$dbname"); $result=mysql_query("select * from members where username='$username' and password='$password'"); $number_of_rows = mysql_num_rows($result); if ($number_of_rows>0) { include("../check.inc.php"); } if ($ok>0) {

$leigh2 = mysql_query("SELECT * FROM members WHERE username='$username'"); $owner=(mysql_result($leigh2,0,"owner"));

if(!isset($_GET['page'])){ $page = 1; } else { $page = $_GET['page']; }

$max_results = 1000; $from = (($page * $max_results) - $max_results);

$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM gallery")); $total_pages = ceil($total_results / $max_results);

$sql = mysql_query("SELECT * FROM gallery WHERE cat='$cat' ORDER BY id desc LIMIT $from, $max_results"); while($row = mysql_fetch_array($sql)){ $whoname = $row['username']; $link = $row['link']; $id = $row['id']; include 'smilies.inc.php'; echo "<a href="$link">$whoname</a> " ; if($owner=="1") { echo ",<a href="delpic.php?username=$username&password=$password&id=$id">[x]</a> "; } }

if($page < $total_pages){ $next = ($page + 1); echo "<a href="".$_SERVER['PHP_SELF']."?page=$next&name=$name&username=$username&password=$password">(Next)</a> "; } if($page > 1){ $prev = ($page - 1); echo "<a href="".$_SERVER['PHP_SELF']."?page=$prev&name=$name&username=$username&password=$password">(Prev)</a> "; } $i = 1; $i <= $total_pages; $i++ ;

echo "

<a title="Enter" href="up.php?action=upload&cat=$cat&username=$username&password=$password">(Upload)</a>"; echo " "; echo "<a title="Enter" href="index.php?username=$username&password=$password">(Back)</a>"; echo " ";

} echo " "; echo "</card>"; echo "</wml>"; ?>

and table for gallery is

CREATE TABLE IF NOT EXISTS galleryl ( id mediumint(50) NOT NULL auto_increment, username varchar(20) NOT NULL default '', cat varchar(50) NOT NULL default '', link varchar(250) NOT NULL default '', PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

crazybrumi Super moderator Principal · 1,064 posts #2

$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM gallery")); $total_pages = ceil($total_results / $max_results);

try replacing that with this from the original

$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM bkmsgs WHERE username='$name'"),0); 
$total_pages = ceil($total_results / $max_results);

if it wasnt and ur table was called gallery like in original coding you posted itl be

$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM gallery WHERE username='$name'"),0); 
$total_pages = ceil($total_results / $max_results);

be carefull as this gallery is hackable

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

Guest #3

its not the gallery that is hackable adminx is hackable because my site where hacked with adminx if u have adminx on your site delete it

Guest #5

I got rid of the error thanks, there doesnt seem to be any code to put it on pages at the moment all pic's are on one page ? . but hopefully i'll sort that 🙂

Guest #6

the shell script wont work if it cant be uploaded with .php ext at the end I hate that shell script grrrr

immortalempire Developer · 219 posts #8

u can get hacked through the gallery as mine was by darkdesire .. some ppl still use it but they might of fixed the problem

subzero Super moderator Fellow · 3,954 posts #10

with your upload edit it

You really wont to f**k fake hackers grrr tossers they are lol

$file_name = str_replace("php","%%@(!)",$file_name);
$file_name = str_replace(".php","%%@(!)",$file_name);
$file_name = str_replace("rem","%%@(!)",$file_name);

and also place in headers of downloads

$allowed_ext = array (

  // archives
  'zip' => 'application/zip',
  'rar' => 'application/rar',

  // documents
  'pdf' => 'application/pdf',
  'doc' => 'application/msword',
  'xls' => 'application/vnd.ms-excel',
  'ppt' => 'application/vnd.ms-powerpoint',
  'txt' => 'application/txt',
  'php' => 'application/txt',

  // executables
  'exe' => 'application/octet-stream',
  'jad' => 'application/jad',
  'jar' => 'application/jar',

  // images
  'gif' => 'image/gif',
  'png' => 'image/png',
  'jpg' => 'image/jpeg',
  'jpeg' => 'image/jpeg',
  'bmp' => 'image/bmp',

  // audio
  'mp3' => 'audio/mpeg',
  'wav' => 'audio/x-wav',
  'mid' => 'audio/x-mid',
  'midi' => 'audio/x-mid',

  // video
  'mpeg' => 'video/mpeg',
  '3gp' => 'video/3gp',
  'mpg' => 'video/mpeg',
  'mpe' => 'video/mpeg',
  'mov' => 'video/quicktime',
  'avi' => 'video/x-msvideo'
);

header("Content-Type: $allowed_ext");

Now let them suckers try it lol all files what go in php are uploaded are now a text file only can see whats in rem.php.sis blah blah

all my sites are locked from noobs but my coding always slap them back in there bum lol i can see who uploads stuff lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close