All pastes #991152 Raw Edit

Stuff

public php v1 · immutable
#991152 ·published 2008-04-20 19:20 UTC
rendered paste body
// opendb.php<?php$dbhost = "";$dbuser = "";$dbpass = "";$mysql_conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die ("Error connecting to mysql: ".mysql_error());print ("Connected Success");$dbname = "";mysql_select_db($dbname, $mysql_conn);?>//closedb.php<?phpmysql_close( $mysql_conn);print "Closed";?>//Create_Students.php<?phpinclude ("opendb.php");print "Before SQL var";$sql = "CREATE TABLE STUDENTS(student_id INT NOT NULL AUTO_INCREMENT,student_first_name char(20) NULL, student_last_name char(20) NULL,student_date_of_birth date NULL,student_course_id int NULL,student_year date NULL,student_tutor_id int NULL,PRIMARY KEY (student_id));"; mysql_query($sql,$mysql_conn) or die ("Wrong: ".mysql_error());print "After query exec";include ("closedb.php");?>