Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2002
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts

    'update' submit button

    hey all

    below is a code that i'm trying to alter from an avidgamers community. i've added something to it (in bold), but when i load the created page, the text entered in the new field does not update when the update button is clicked, even though the extra code is a copy of code that does update. The code for the submit button is in italics.

    i'm confusing myself.

    Code:
    <p><h3>Account setup for [uname]</h3>
    <table border=1 cellpadding=3 cellspacing=0><tr><td>
    <form method=post action="account.php">
    <table border=0 cellpadding=3 cellspacing=0>
    <tr><td align=left valign=top>Username:</td>
    <td align=left><input type=text size=25 maxlength=80 name="uname" value="[uname]"></td></tr>
    <tr><td align=left valign=top>Login name (optional):</td>
    <td align=left><input type=text size=25 maxlength=80 name="login_name" value="[login_name]"><br><small>(if left blank, username is used)</small></td></tr>
    <tr><td align=left valign=top>Combat Level:</td>
    <td align=left><input type=text size=5 maxlength=3 name="cmbt" value="[cmbtlevel]"></td></tr>
    <tr><td align=left valign=top>Email:</td>
    <td align=left><input type=text size=30 maxlength=150 name="email" value="[email]"><br>
    <input type=checkbox name="show_email"[if:show_email] checked[endif:show_email]> Show email in member list</td></tr>
    <tr><td align=left valign=top>ICQ:</td>
    <td align=left><input type=text size=15 maxlength=12 name="icq" value="[icq]"></td></tr>
    <tr><td align=left valign=top>AIM:</td>
    <td align=left><input type=text size=20 maxlength=100 name="aim" value="[aim]"></td></tr>
    <tr><td align=left valign=top>Info:</td>
    <td align=left><textarea cols=25 rows=3 wrap=soft name="info">[info]</textarea></td></tr>
    <tr><td></td><td align=left valign=top><input type=submit name=update value="Update"></td></tr></table>
    </form>
    </td></tr></table></p>
    <p><h3>Change password</h3>
    <table border=1 cellpadding=3 cellspacing=0><tr><td>
    <form method=post action="account.php">
    <table border=0 cellpadding=3 cellspacing=0>
    <tr><td align=left valign=top>New password:</td>
    <td align=left><input type=password size=20 maxlength=40 name="password"></td></tr>
    <tr><td align=left valign=top>Repeat password:</td>
    <td align=left><input type=password size=20 maxlength=40 name="password_repeat"></td></tr>
    <tr><td></td><td align=left valign=top><input type=submit name="pass_change" value="Change password"></td></tr></table>
    </form>
    </td></tr></table></p>
    any ideas as to why the new 'combat level' field does not update, even though the 'icq' and 'aim' fields do?

    much appreciated,

    fae

  • #2
    New Coder
    Join Date
    Aug 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why of course not. Look again:

    <tr><td align=left valign=top>Combat Level:</td>
    <td align=left><input type=text size=5 maxlength=3 name="cmbt" value="[cmbtlevel]"></td></tr>

    There is no variable named "[cmbtlevel]"; only "[cmbt]".
    Change it to either one of these:

    <tr><td align=left valign=top>Combat Level:</td>
    <td align=left><input type=text size=5 maxlength=3 name="cmbt" value="[cmbt]"></td></tr>

    or

    <tr><td align=left valign=top>Combat Level:</td>
    <td align=left><input type=text size=5 maxlength=3 name="cmbtlevel" value="[cmbtlevel]"></td></tr>


    btw, why not post this in AG public boards instead?

    PS: For those of you who don't what avidgamers is, click here.
    This was another dumb post by: ShdwStal

  • #3
    New Coder
    Join Date
    Oct 2002
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hmm..i'll have to try..i thought the name of the "text" item wasnt related to the name of its variable...still, its worth a shot

    btw, i posted this here cos you guys are the first ppl i thought of even though Adamlucas has been inactive for over half a year..

    -edit-

    wahey it works thanks a million
    Last edited by Faeroph; 10-29-2002 at 10:56 PM.


  •  

    Posting Permissions

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