Jump to content

Mysql Connect


behonest

Recommended Posts

no, you can use phpmyadmin to add a database, a table, and even the data to the table rows. No need for a mysql editor (never heard of one)MySql also has its own MySqlAdmin software that is a lot like phpmyadmin. A graphical user interface is all it is, really.

Link to comment
Share on other sites

Dear Sir,recenlty,i am working on USER/LOGIN page of a web.i have made a database named as "login" with table name "form" and there r three fields such as "id","user" and "pass".Also there are two records.i am using the following php scripting to connect and activate user/login page.<?php session_start(); ?><html><body><form action='login.php?login=yes' method=post>Username: <input type=text name='user' /> <br/>Password: <input type=password name='pass' /> <br/><input type=submit value='Go' /></form> <?php$user=$_POST['user'];$pass=$_POST['pass'];$login=$_GET['login'];if ($login=='yes'){$con=mysql_connect('localhost','root', '');mysql_select_db('login');$get=mysql_query("SELECT count(id) FROM form WHERE user='$user' AND pass='$pass'"); $result=mysql_result($get, 0);mysql_close($con);if($result=1) echo "Login Failure";else {echo "login success";$_SESSION ['user']=$user;};};?></body></html>The problem is that when i enter the same user and password in input fields of web page it give error such as "LOGIN FAILURE.can u please guide me where i am wrong????

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...