MadTechie Posted December 1, 2009 Share Posted December 1, 2009 Well they are probably missing the code that sets up the database "mysql_connect()" Quote Link to comment Share on other sites More sharing options...
Tallahassee Posted December 1, 2009 Author Share Posted December 1, 2009 So what should I do? Quote Link to comment Share on other sites More sharing options...
MadTechie Posted December 1, 2009 Share Posted December 1, 2009 Well at a guess your need to include your configuration file, When/how did all these problem occur ? Quote Link to comment Share on other sites More sharing options...
Tallahassee Posted December 1, 2009 Author Share Posted December 1, 2009 Well me and my friend have been doing html/php sites for a while now, and we were gonna call them "The Custom Projects" but we changed it to cuztomz... blah blah, we decided to make this site, similar to myspace called iMe, and we've never had problems in making a site as hard as this site is. So we uploaded all our files to a webhost to test it and its not working. I need to get all the site working before I buy web hosting. But, it started the first time I went to test the site fully. Of course we tested it through the editing, but they actully worked a little bit ontil we finished the whole site, now nothing will work. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted December 1, 2009 Share Posted December 1, 2009 I don't see how this could of worked locally either, So did you both write it? as these problems are basic errors, ie "supplied argument is not a valid MySQL-Link resource" means you have supplied an invalid MySQL-Link resource, hence its probably not connected to the database Quote Link to comment Share on other sites More sharing options...
Tallahassee Posted December 1, 2009 Author Share Posted December 1, 2009 Heres the beggining of my data.php <?php //db access info $sql_host='sql208.byethost9.com'; $sql_user='b9_3809807'; $sql_pass='******'; $sql_db='b9_3809807_iMe'; I blocked my pass btw Quote Link to comment Share on other sites More sharing options...
Tallahassee Posted December 2, 2009 Author Share Posted December 2, 2009 Although, I beleive that, that is my db/user/pass/host , I got confused whenever I added it to data.php and the other files that needed it. How do I make sure those are correct? Quote Link to comment Share on other sites More sharing options...
Tallahassee Posted December 2, 2009 Author Share Posted December 2, 2009 bump Quote Link to comment Share on other sites More sharing options...
Tallahassee Posted December 3, 2009 Author Share Posted December 3, 2009 I beleive I have an error in the beginning of my functions.php aswell. <?php $conn_id; $sql_res; $sql_res2; $sql_query; $HTTP_REFERER=$_SERVER["HTTP_REFERER"]; $REQUEST_METHOD=$_SERVER["REQUEST_METHOD"]; function sql_connect(){ global $conn_id,$sql_host,$sql_user,$sql_pass,$sql_db; $conn_id=mysql_connect($sql_host,$sql_user,$sql_pass); mysql_select_db($sql_db); } function sql_execute($sql_query,$wtr){ global $conn_id; $sql_res=mysql_query($sql_query,$conn_id); if($wtr=='get'){ if(mysql_num_rows($sql_res)){ return mysql_fetch_object($sql_res); } else { return ''; } } elseif($wtr=='num'){ return mysql_num_rows($sql_res); } elseif($wtr=='res'){ return $sql_res; } } function sql_rows($id,$table){ global $conn_id; $query="select $id from $table"; $result=mysql_query($query,$conn_id); $number=mysql_num_rows($result); return $number; } function sql_close(){ global $conn_id; mysql_close($conn_id); } function h_banners() { global $cookie_url,$main_url; $sql="select * from banners where b_blk='N' and b_typ='H' and b_exp='N'"; $res=mysql_query($sql); $dis=array(); $dis_id=array(); $num=mysql_num_rows($res); if(mysql_num_rows($res)) { while($row=mysql_fetch_object($res)) { $tmp=explode(".",$row->b_img); $tmp_count=count($tmp); $ext=strtolower($tmp[$tmp_count-1]); if($ext=="swf") { Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.