Update into DB virker ikke
Jeg skal lave en retrive password, hvor jeg bruger en update til at lave koden om til 1234 og sender til brugern men jeg kan ikke få min update side til at virke her er koden...Jeg får hvid skærm når jeg kommer ind på update siden
<?php
include("func.php");
DB::Conn("open");
$query = mysql_query("select `*` from `db_users`
where `username`='" . $_POST['username'] . "'") or die (mysql_error());
if (!empty($_POST['username'])
&& !empty($_POST['email'])
{
$username = $_POST['username'];
$email = $_POST['email'];
$password = md5"1234";
mysql_query("update db_users set password = '$password' WHERE username = '$username' and email = '$email'") or die (Java::Alert("MySQL Error: ".mysql_error()));
Db::Conn(close);
Java::GoToURL("index.php?menu=account&page=account_account");
} else { ?>
<table>
<tr>
<td>
</td>
</tr>
</table>
<table bgcolor="#FFFF00" align="center" style="border: 1px gray solid;">
<tr>
<td align="center">
Warning
</td>
</tr>
<? if($_POST['username'] == ""){ ?>
<tr>
<td>
The <strong>Username</strong> field is empty?
</td>
</tr>
<? } ?>
<? if($_POST['password'] == ""){ ?>
<tr>
<td>
The <strong>Password</strong> field is empty?
</td>
</tr>
<? } ?>
</table>
<table align="center">
<tr>
<td>
<a href="java script:history.go(-1)">Go Back</a>
</td>
</tr>
</table>
<? }?>
