mysql - unable to access certain php pages on localhost -
i have login page,login_form, menu page, , download page , has been running on server before want run on local host, hence, copied , set in /var/www/html folder , able run login page rest menu.php , dont come up. has sql database added scheme using, mysql -u root -p exaample < cs303.sql , able process normal select statements here happens know happening?
<?php ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); define ('hostname', 'localhost'); define ('username', 'root'); define ('password', 'merlin'); define ('database_name', 'wicap'); $db = mysql_connect('localhost', 'root', 'merlin') or die ('cannot connect mysql.'); // connecting database
//echo"l; km;l"; mysql_select_db('wicap.sql');
$v1=$_request["username"]; $v2=$_request["password"]; //echo "sdfdf"; //$v1="ritish"; //$v2="ritish_r"; //echo($user); //echo($pass); $q=mysql_query("select * login pass='".$v2."' , user='".$v1."'"); while($r=mysql_fetch_array($q)) { echo($r[0].$r[1]+"/n"); echo "mohit"; } mysql_close();
?>
@merlinsudar: more clarity demonstrating code here
<?php //first php opening tag //put these lines ini_set("error_reporting",1) ini_set('display_errors',1); . //you code . //you code ?>
hope helps
php mysql
No comments:
Post a Comment