hi everybody,
i have been assisgned a work to make an assesment record for students. i have made a programm that can help students to login with some password that i set using command in mysql, and after that they can sumbit , view and manipulate their record, how ever my php script for changing password is not working.
my codes are -->
<?php
$UID=$_POST['username'];
$pw=$_POST['password'];
$newpassword=$_POST['newpassword'];
$connection =mysql_connect("localhost",$UID,$pw);
{
mysql_select_db('DATABASE',$connection)
or die("Query failed: " . mysql_error());
problem--------- > result=mysql_query("SET PASSWORD FOR
$UID@localhost= PASSWORD('$newpassword')");
if (!$result)
{
print"Insert Error";
mysql_close($connection);
}
else
print("Insert OK");
print"<action=index.php3>";---GO TO LOGIN PAGE.
}
?>
but this code is not working, it is returning me insert error, can anybody suggest me whats wrong.
Another question is that i want to include a code in my final script such that on getting new entry in the table by the user, the automatic mail should be generated to all group user informing that a new record has been added by this particular user.
how can i do this.
e-mail generator🙂
i do not know, i know little about programming and now i have to do a lot.