Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.

In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.

left Zymic Webmaster ForumsZymic Free Web HostingDatabases & MySQL right
  Reply to this topic Start new topic
left right
VATA1
post May 24 2009, 05:11 AM
Post #1


Newbie
*

Group: Members
Posts: 8
Joined: 22-August 08
From: USA
Member No.: 56,302



So, I have had someone working on my site on another host, converting it form HTML to PHP. I am now moving the site over to Zymic. I have created the databases in MySQL, and I have tried EVERYTHING to try and make my website, http://vata.vndv.com/ work. I know basically nothing about how PHP works. So, here is what my .htaccess file has, where I believe the problem lies.

RewriteEngine on
RewriteBase /www/vndv.com/v/a/t/vata/htdocs/
RewriteRule ^main.php$ main.php [QSA,L]
RewriteRule ^([a-zA-Z0-9]+)\.php$ main.php?page=$1.php [QSA,L]Options All Indexes


Basically, whenever my site loads, it uses main.php as the template for all the other pages, and the other pages just fill in the one area that changes on every page. I have a dbclass.php file on my server that is used to connect to the MySQL database. Here is what that file says.

<?php
if(!defined('INDEX')) die();
class db {

protected $con;
public $result;

function __construct($host='localhost', $user='vata_(my username)', $pass='(my usernames pass)', $base='vata_(my DB)') {
$this->con = mysql_connect($host, $user, $pass);
mysql_select_db($base, $this->con);
}

function __destruct() {
mysql_close($this->con);
}

function fetch_array($sqlquery) {
$this->result = array();
$this->q = mysql_query($sqlquery, $this->con);
while($this->tempresult = mysql_fetch_assoc($this->q)) $this->result[] = $this->tempresult;
}

function fetch_result($sqlquery) {
$this->result = array();
$this->q = mysql_query($sqlquery, $this->con);
if($this->q) $this->result = mysql_fetch_assoc($this->q);
}

function query($sqlquery) {
$this->result = mysql_query($sqlquery, $this->con);
}
}
?>

I have absolutely no clue why it just wont connect. Yes, my username is less than 16 characters. Any input is much appreciated!


***Problem has been fixed***
Go to the top of the page 
 
  + Quote Post
 Reply to this topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 21st November 2009 - 08:38 AM