PHP Login System with Admin Features

This forum was created to talk about the PHP Login System with admin features created by jpmaster77 on evolt's website


    Any one know if a 'textarea' can be used?

    Share
    avatar
    ragtech

    Number of posts : 10
    Age : 58
    Registration date : 2009-04-08

    Any one know if a 'textarea' can be used?

    Post  ragtech on Wed Apr 08, 2009 3:22 am

    I tried this in the register.php but it didn't work, I am just a baby when it comes to php so if you can help please treat me as such Shocked I love this script though... it was just what I was looking for. When I came across it I was amazed how it worked... whoever is responsible, THANK YOU!

    Here is what I tried in the register.php

    <textarea name="description" cols="50"><? echo $form->value("description"); ?></textarea></td><td><? echo $form->error("description"); ?>

    I had also tried adding some java so that it would count the charaters while the user was typing in the textarea, it worked but it would not save the data. got no errors... just would not save to mysql.

    here is the java (this part went in the <head>...

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Limit textarea -->
    <!-- Begin
    function textCounter(field, countfield, maxlimit) {
    if (field.value.length > maxlimit) // if too long...trim it!
    field.value = field.value.substring(0, maxlimit);
    // otherwise, update 'characters left' counter
    else
    countfield.value = maxlimit - field.value.length;
    }
    // End -->
    </script>

    this was added to the textarea tag

    onKeyDown="textCounter(this.form.description,this.form.remLen,100);" onKeyUp="textCounter(this.form.message,this.form.remLen,100);


    this part was the counter it went just below the textarea box:

    <input readonly type=text name=remLen size=3 maxlength=3 value="100"> (Characters Left)


    not too worried about using the counter but would really like to use a textarea instead of <input type="text"....
    avatar
    Linchpin311

    Number of posts : 220
    Age : 33
    Localisation : Long Island
    Registration date : 2007-05-14

    Re: Any one know if a 'textarea' can be used?

    Post  Linchpin311 on Wed Apr 08, 2009 6:50 am

    of course a textarea can be used. i use them all the time. with a little ingenuity, any aspect of the HTML form can be used really. and since javascript is a client side scripting language, it really shouldnt be able to interfere with what php is trying to do. my guess is your problem lies with one of the other files responsible for adding information to the database (process.php, database.php or session.php). i would double check that you edited the script correctly in those areas.


    _________________
    in the end, the universe tends to unfold as it should...

    Also note that it is your responsibility to die() if necessary.
    avatar
    ragtech

    Number of posts : 10
    Age : 58
    Registration date : 2009-04-08

    Re: Any one know if a 'textarea' can be used?

    Post  ragtech on Wed Apr 08, 2009 12:18 pm

    register.php & useredit.php are the only one's that should be affected... I would think but who am I to say... all I know is that when I changed them back from a "textarea" back to the <input type="text"... it all worked fine...

    if something in the others needs to be changed can you let me know what or how to do this?

    Like I said I am a complete beginner when it comes to PhP.

    Any help would be appreciated!
    avatar
    Linchpin311

    Number of posts : 220
    Age : 33
    Localisation : Long Island
    Registration date : 2007-05-14

    Re: Any one know if a 'textarea' can be used?

    Post  Linchpin311 on Wed Apr 08, 2009 7:09 pm

    hmm, thats odd... you say it works when you have <input type="text" name="description"> but it doesnt when you have <textarea name="description"></textarea> i honestly dont know of any reason why it would be doing that other than a misspelling or misconfiguration in your code.

    can you post an exact snippet of what worked for you and what didnt?


    _________________
    in the end, the universe tends to unfold as it should...

    Also note that it is your responsibility to die() if necessary.
    avatar
    ragtech

    Number of posts : 10
    Age : 58
    Registration date : 2009-04-08

    Got it... you were correct

    Post  ragtech on Sun Apr 12, 2009 7:06 am

    Linchpin311

    Thanks, after working with it a while I got it working. Sorry I didn't get back to you sooner but I wanted to try for a while longer to see if I could get it.


    I am having another problem put I'll make a new post... maybe you can help me out on that one as well

    again, thanks

    Sponsored content

    Re: Any one know if a 'textarea' can be used?

    Post  Sponsored content


      Current date/time is Wed Nov 14, 2018 12:18 am