Page 1 of 1

I have some error in my site with database. help me pleas

Posted: Thu Jun 04, 2009 3:21 pm
by honest
Hi all....
this is my http://www.psinkobux.1sthoster.com
I have some error in my site with database please help me guys

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/honest/public_html/index.php on line 12
---
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/honest/public_html/index.php on line 25
---
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/honest/public_html/index.php on line 29
---
and many errors.browsing my site http://www.psinkobux.1sthoster.com you will find another errors
any one can help me please...

Re: I have some error in my site with database. help me pleas

Posted: Thu Jun 04, 2009 3:23 pm
by Chalks
could you show us your code (up through line 30ish) please?

Re: I have some error in my site with database. help me pleas

Posted: Thu Jun 04, 2009 3:33 pm
by honest
the errors
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/honest/public_html/index.php on line 12
---
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/honest/public_html/index.php on line 25
---
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/honest/public_html/index.php on line 29
---
the code

Code: Select all

<?php include ('header.php'); 
 
?>
 
 
<h3>Join Now and Get Paid to Visit Websites!</h3>
 
<p><img class="img-left" src="images/users.png" width="48" height="48" alt="Image" />
At <? include('sitename.php'); ?>, you get paid to click on ads and visit websites. The process is easy! You simply click a link and view a website for a few seconds to earn money. You don't need any skills. This is because all you need to do is visit the sites we provide you with. <span class="highlight">You can earn even more by referring friends.</span> Payment requests can be made every day and are processed through PayPal. The minimum payout is $<? require ('config.php');
                                $sql = "SELECT * FROM tb_config WHERE item='payment' and howmany='1'";
                                $result = mysql_query($sql);        
                                $row = mysql_fetch_array($result); echo $row["price"];
                                mysql_close($con); ?></p>
 
<p align="right"><?php echo "<a href=\"register.php?r=".$elref."\">";?>Join Now!</a></p>
 
<h3>Advertise Here</h3>
 
<p><img class="img-left" src="images/money.gif" width="48" height="48" alt="Image" />
 
Setting up and displaying your link for <? include('sitename.php'); ?> members to visit is fast and simple. We charge $<? 
                                require ('config.php');
                                $sql = "SELECT * FROM tb_config WHERE item='hits' and howmany='1000'";
                                $result = mysql_query($sql);        
                                $row = mysql_fetch_array($result); echo $row["price"]; mysql_close($con);?> 
                                per <? require ('config.php');
                                $sql = "SELECT * FROM tb_config WHERE item='hits' and howmany='1000'";
                                $result = mysql_query($sql);        
                                $row = mysql_fetch_array($result);echo $row["howmany"]; mysql_close($con);?> 
                                member visits and each visit will last at least 20 seconds. 
                                Outside visits are unlimited and included within the price.
                                We will review your website and will have it active within 24 hours. You don’t need an account to order advertising at <?php include ('sitename.php');?>, you simply need to complete the form then pay the fee. If you would like a large package then please feel free to contact us. We will review your website within just a few hours or less. But will NOT accept illegal or adult material neither the use of frame breakers.</p>
<p align="right"><?php echo "<a href=\"advertise.php?r=".$elref."\">";?>Read More...</a></p>
 
 
<?                  require ('config.php');
                    $sqlzdu = "SELECT * FROM tb_config WHERE item='referalclick' and howmany='1'";
                    $resultzdu = mysql_query($sqlzdu);        
                    $myrowzdu = mysql_fetch_array($resultzdu);
                    $elprecioref=$myrowzdu["price"];
 
                    $sqlzduz = "SELECT * FROM tb_config WHERE item='click' and howmany='1'";
                    $resultzduz = mysql_query($sqlzduz);        
                    $myrowzduz = mysql_fetch_array($resultzduz);
                    $elprecioa=$myrowzduz["price"];
 
                    $elprecio=$elprecioa*10;
                    $cien=$elprecioref*100*10;
                    $daily=$elprecio+$cien;
                    $monthly=$daily*30;
                    $yearly=$monthly*12;
                    mysql_close($con);
 
                ?>
 
<p>&nbsp;</p>
<blockquote><h4>How much can I earn?</h4>
 
If you click 10 ads a day, you refer 100 members who click 10 ads a day, you could earn up to $<?php echo $monthly?> monthly, that means $<?php echo $yearly ?> yearly. With more referrals or ads the earning potential is endless.</blockquote>
 
 
 
 
 
<?php include ('footer.php'); ?>

Re: I have some error in my site with database. help me pleas

Posted: Thu Jun 04, 2009 3:46 pm
by Chalks
try changing line 11 to this:

Code: Select all

$result = mysql_query($sql);
echo mysql_error();
What happens?

Re: I have some error in my site with database. help me pleas

Posted: Thu Jun 04, 2009 4:20 pm
by honest
nothing happened the error change to line 13
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/honest/public_html/index.php on line 13

the error in this line

Code: Select all

$row = mysql_fetch_array($result); echo $row["price"];

Re: I have some error in my site with database. help me pleas

Posted: Thu Jun 04, 2009 4:25 pm
by Chalks
the error is in that line because the previous line doesn't fetch any valid resource. Which means your query is messed up. Make sure that you have all the field names spelled correctly, and check and make sure there is actually data in the table.

Code: Select all

$sql = "SELECT * FROM tb_config WHERE item='payment' and howmany='1'";
The above is wrong. Somehow. Probably in the howmany field. Try changing it to this:

Code: Select all

$sql = "SELECT * FROM tb_config WHERE item='payment' and howmany=1";

Re: I have some error in my site with database. help me pleas

Posted: Thu Jun 04, 2009 4:40 pm
by honest
nothing happened visit the site and see the errors

Re: I have some error in my site with database. help me pleas

Posted: Thu Jun 04, 2009 8:51 pm
by honest