Jump to content

What is the problem?


chand.sethi77

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

Archived

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

×
×
  • Create New...