Jump to content

Mysql Connect


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...