Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27

Thread: Admin Panel

  1. #21
    Join Date
    May 2005
    Location
    Burgessville
    Posts
    806
    Tokens
    0

    Default

    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..

  2. #22
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Thats a nice tutorial

    - Dan

  3. #23
    Join Date
    May 2005
    Location
    Burgessville
    Posts
    806
    Tokens
    0

    Default

    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..

  4. #24
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    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

  5. #25
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Quote 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
    What do you mean?

    - Dan

  6. #26
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Hey let me pm you some details real fast

  7. #27
    Join Date
    May 2005
    Location
    Burgessville
    Posts
    806
    Tokens
    0

    Default

    Quote Originally 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
    spelling mistake m8
    u ahve Uodated i think u want Updated

    Originally Posted by bananasislegend
    this thread might be better than sex..

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •