Jump to content

What is the problem?


Recommended Posts

This is my code.

 <?php$connect = mysql_connect ("localhost", "root", "");	if (!$connect){		die ("error, Could not connect to mysql! " . " " . mysql_error());	}?><?php$select = mysql_select_db ("kiddo", $connect);	if(!$connect){		die ("Couldn't connect to database." . " " . mysql_error());	}?><?php$name = $_POST['name'];$username = $_POST['username'];?><?php$sql = mysql_query ("INSERT INTO users (name, username) VALUES ($name, $username) ");if (!$sql){	die ("Error! Mysql Query failed." . " " . mysql_error());}else {	echo "Registered successfully" . "<a href='registered.php'>" . "Click here" . "</a>" . "to see your name!";}?><?phpmysql_close ($connect)?>

I have not factored it yet. The error is that is says "Error! Mysql Query failed. Unknown column 'Chand' in 'field list' " here Chand is $_POST['name'].WHat to do??????ThanksChaand Sethi

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...