04-14-2009, 06:12 PM
|
#6 (permalink)
|
|
The Wanderer
Join Date: Apr 2009
Posts: 19
Thanks: 9
|
but still its not working....i made the following changes
<?php
$username = $_POST['username'];
$password = md5($_POST['password']);
$type= "Guest";
$connect = mysql_connect("localhost","root","") or die ("Couldn't connect");
mysql_select_db("inspirations") or die("Couldn't find db");
$query1 = mysql_query("INSERT INTO `school_inspirations`.`user_acc` (`username` ,`password`,'type') VALUES ( '$username','$password','$type')") or die ("Couldn't update in user");
mysql_query($query1);
?>
error
Couldn't update in user
<?php
$username = $_POST['username'];
$password = md5($_POST['password']);
$type= "Guest";
$connect = mysql_connect("localhost","root","") or die ("Couldn't connect");
mysql_select_db("inspirations") or die("Couldn't find db");
$query1 = mysql_query("INSERT INTO `school_inspirations`.`user_acc` (`username` ,`password`,'type') VALUES ( '$username','$password','$type')") or die (mysql_error());
mysql_query($query1);
?>
error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''type') VALUES ( 'adsfa','912ec803b2ce49e4a541068d495ab570','Guest' )' at line 1
__________________
--
Regards
Shankar
|
|
|
|