0

guys, i developed Students alumni project,in php + mysql where students registers and check their online status and view his academic records, i completed evaluated my project on local host, WAMP(apache), and my project worked fine, all db connection, data access everthing is fine on local host but on Online host, it isn't working mean when i register as a student then no data submits to database , even i uploaded and check connection, online bt not working, here is my script thats being online , mysql's script

-- MySQL dump 10.13  Distrib 5.5.9, for Win32 (x86)
--
-- Host: localhost    Database: kustkht
-- ------------------------------------------------------
-- Server version   5.5.15

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `kustkht`
--



--
-- Table structure for table `department`
--

DROP TABLE IF EXISTS `department`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `department` (
  `departmentid` int(11) NOT NULL AUTO_INCREMENT,
  `departmentName` varchar(50) DEFAULT NULL,
  `userid` varchar(50) DEFAULT NULL,
  `password` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`departmentid`),
  UNIQUE KEY `departmentName_UNIQUE` (`departmentName`),
  UNIQUE KEY `userid_UNIQUE` (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COMMENT='contains information about department';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `department`
--

LOCK TABLES `department` WRITE;
/*!40000 ALTER TABLE `department` DISABLE KEYS */;
/*!40000 ALTER TABLE `department` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `students`
--

DROP TABLE IF EXISTS `students`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `students` (
  `registrationNo` varchar(45) NOT NULL DEFAULT '',
  `name` varchar(45) DEFAULT NULL,
  `fatherName` varchar(45) DEFAULT NULL,
  `cnic` varchar(45) DEFAULT NULL,
  `gender` varchar(10) DEFAULT NULL,
  `discipline` varchar(45) DEFAULT NULL,
  `department` varchar(50) DEFAULT NULL,
  `admissionSession` varchar(20) DEFAULT NULL,
  `email` varchar(45) DEFAULT NULL,
  `password` varchar(45) DEFAULT NULL,
  `address` varchar(200) DEFAULT NULL,
  `domicile` varchar(45) DEFAULT NULL,
  `contactNo` varchar(35) DEFAULT NULL,
  `status` varchar(15) DEFAULT NULL,
  `currentEmployer` varchar(45) DEFAULT NULL,
  `designation` varchar(45) DEFAULT NULL,
  `salaryInfo` varchar(45) DEFAULT NULL,
  `totalExperience` varchar(45) DEFAULT NULL,
  `lastOrganizationname` varchar(100) DEFAULT NULL,
  `organizationAdd` varchar(45) DEFAULT NULL,
  `organizationPhno` varchar(45) DEFAULT NULL,
  `organizationEmail` varchar(45) DEFAULT NULL,
  `Remarks` varchar(400) DEFAULT NULL,
  PRIMARY KEY (`registrationNo`),
  UNIQUE KEY `registrationNo_UNIQUE` (`registrationNo`),
  UNIQUE KEY `email_UNIQUE` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='student''s table used to contain fields about user , ';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `students`
--

LOCK TABLES `students` WRITE;
/*!40000 ALTER TABLE `students` DISABLE KEYS */;
/*!40000 ALTER TABLE `students` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `studentsdepartments_clearance`
--

DROP TABLE IF EXISTS `studentsdepartments_clearance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `studentsdepartments_clearance` (
  `stddepid` int(11) NOT NULL AUTO_INCREMENT,
  `departmentid` int(11) NOT NULL,
  `registrationNo` varchar(45) NOT NULL DEFAULT '',
  `date` varchar(45) DEFAULT NULL,
  `clearance` varchar(3) DEFAULT NULL,
  `remarks` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`stddepid`),
  KEY `departmentid` (`departmentid`),
  KEY `registrationNo` (`registrationNo`),
  CONSTRAINT `departmentid` FOREIGN KEY (`departmentid`) REFERENCES `department` (`departmentid`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `registrationNo` FOREIGN KEY (`registrationNo`) REFERENCES `students` (`registrationNo`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 COMMENT='weak entity , contains the records of students'' clearance fr';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `studentsdepartments_clearance`
--

LOCK TABLES `studentsdepartments_clearance` WRITE;
/*!40000 ALTER TABLE `studentsdepartments_clearance` DISABLE KEYS */;
/*!40000 ALTER TABLE `studentsdepartments_clearance` ENABLE KEYS */;
UNLOCK TABLES;


/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2012-10-09 18:22:02
2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by HunainHafeez
4

@HunainHafeez

guys, i developed Students alumni project,in php + mysql where students registers and check their online status and view his academic records, i completed evaluated my project on local host, WAMP(apache), and my project worked fine, all db connection, data access everthing is fine on local host but on Online host, it isn't working mean when i register as a student then no data submits to database , even i uploaded and check connection, online bt not working, here is my script thats being online , mysql's script

How did you upload the mysql code? Is it in like this table.sql file or table.php file? You can upload (Import) the table.sql file in the PHPMyAdmin section.

You have to understand that when you used WAMP or EasyPHP the DB connection is different from the host server.

Here is a link or tutorial to show you how to connect to your DB either mysql or mysqli on WAMP or EasyPHPor online:

http://www.daniweb.com/web-development/php/code/434415/using-phpmysql-with-error-checking

or

http://www.daniweb.com/web-development/php/code/434480/using-phpmysqli-with-error-checking

I used mysqli and I'm not sure what you used.

Just read that follow those comments then you know how to get connected to your host server.

Votes + Comments
To Rectify what some retard did to LastMitch
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.