i tried the one on phpfreaks wth is with it it has way to much junk
i tried the one on phpfreaks wth is with it it has way to much junk
Originally Posted by bananasislegend
this thread might be better than sex..
Thats a nice tutorial
- Dan
nice member system kevin lol u guys now any sumbit scripts like to submit tutorials
(im adding it on to my member system)
Originally Posted by bananasislegend
this thread might be better than sex..
Nope..
Rare ive got the edit but i need it when i click edit on the admin panel:
echo "<td with=\"130\"><div alight=\"center\"><form name=\"edit\" method=\"get\" acton=\"edit.php\"><input name=\"id\" type=\"hidden\" value=\"$id\" /><input name=\"edit\" type=\"submit\" value=\"Edit\" /></form></div></td>";
that on edit.php:
<?
include("adminconfig.php");
$profile = mysql_query("SELECT * from Users where Username = '$id'");
// the above lines get the information so that it can be displayed in the html form.
echo("
<center><form method=\"POST\">
<table width=\"100%\">
<tr>
<td align=\"right\" width=\"25%\">
Name
</td>
<td align=\"left\">
<input type=\"text\" size=\"25\" maxlength=\"25\" name=\"name\" value=\"$profile[Name]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Username
</td>
<td align=\"left\">
<input size=\"25\" name=\"username\" value=\"$profile[Username]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Password</td>
<td align=\"left\">
<input size=\"25\" name=\"password\" value=\"$profile[Password]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Activated</td>
<td align=\"left\">
<input size=\"25\" name=\"act\" value=\"$profile[Activated]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Email</td>
<td align=\"left\">
<input size=\"25\" name=\"email\" value=\"$profile[Email]\"></td>
</tr>
<tr>
<td align=\"center\">
</td>
<td align=\"left\">
<input type=\"submit\" name=\"update\" value=\"Update\"></td>
</tr>
</table>
</form>
</center>");
$Users = mysql_query("SELECT * FROM Users ORDER BY id DESC") or die("Error: Cannot execute query.");
$id=mysql_result($Users,$i,"id");
$email = htmlspecialchars($_POST[Email]);
$name = htmlspecialchars($_POST[Name]);
$username = htmlspecialchars($_POST[Username]);
$password = htmlspecialchars($_POST[Password]);
$date = htmlspecialchars($_POST[Password]);
$act = htmlspecialchars($_POST[Activated]);
// the above lines get rid of all html.
echo ("Uodated");
$update = mysql_query("Update Users set Email = '$email', Name = '$name', Username = '$username', Password = '$password', Date = '$date', Activated = '$act', where Username = '$id'");
// updates the information in the database.;
?>
It shows the info in the correct fields
What do you mean?Originally Posted by Dj-Kevin
Nope..
Rare ive got the edit but i need it when i click edit on the admin panel:
echo "<td with=\"130\"><div alight=\"center\"><form name=\"edit\" method=\"get\" acton=\"edit.php\"><input name=\"id\" type=\"hidden\" value=\"$id\" /><input name=\"edit\" type=\"submit\" value=\"Edit\" /></form></div></td>";
that on edit.php:
<?
include("adminconfig.php");
$profile = mysql_query("SELECT * from Users where Username = '$id'");
// the above lines get the information so that it can be displayed in the html form.
echo("
<center><form method=\"POST\">
<table width=\"100%\">
<tr>
<td align=\"right\" width=\"25%\">
Name
</td>
<td align=\"left\">
<input type=\"text\" size=\"25\" maxlength=\"25\" name=\"name\" value=\"$profile[Name]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Username
</td>
<td align=\"left\">
<input size=\"25\" name=\"username\" value=\"$profile[Username]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Password</td>
<td align=\"left\">
<input size=\"25\" name=\"password\" value=\"$profile[Password]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Activated</td>
<td align=\"left\">
<input size=\"25\" name=\"act\" value=\"$profile[Activated]\"></td>
</tr>
<tr>
<td align=\"right\" width=\"25%\">
Email</td>
<td align=\"left\">
<input size=\"25\" name=\"email\" value=\"$profile[Email]\"></td>
</tr>
<tr>
<td align=\"center\">
</td>
<td align=\"left\">
<input type=\"submit\" name=\"update\" value=\"Update\"></td>
</tr>
</table>
</form>
</center>");
$Users = mysql_query("SELECT * FROM Users ORDER BY id DESC") or die("Error: Cannot execute query.");
$id=mysql_result($Users,$i,"id");
$email = htmlspecialchars($_POST[Email]);
$name = htmlspecialchars($_POST[Name]);
$username = htmlspecialchars($_POST[Username]);
$password = htmlspecialchars($_POST[Password]);
$date = htmlspecialchars($_POST[Password]);
$act = htmlspecialchars($_POST[Activated]);
// the above lines get rid of all html.
echo ("Uodated");
$update = mysql_query("Update Users set Email = '$email', Name = '$name', Username = '$username', Password = '$password', Date = '$date', Activated = '$act', where Username = '$id'");
// updates the information in the database.;
?>
It shows the info in the correct fields
- Dan
Hey let me pm you some details real fast
spelling mistake m8Originally Posted by Dj-Kevin
Nope..
// the above lines get rid of all html.
echo ("Uodated");
$update = mysql_query("Update Users set Email = '$email', Name = '$name', Username = '$username', Password = '$password', Date = '$date', Activated = '$act', where Username = '$id'");
// updates the information in the database.;
?>
It shows the info in the correct fields
u ahve Uodated i think u want Updated
Originally Posted by bananasislegend
this thread might be better than sex..
Want to hide these adverts? Register an account for free!