form posting difficulty

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts

  • DrPollo
    Guest replied
    Re: form posting difficulty

    matt307 <matt307@caroli na.rr.com> wrote in message news:<3F1D7BED. 88191FE1@caroli na.rr.com>...[color=blue]
    > do u know how i would go about just having one page but making the page vary based on the
    > username. such as:
    > main.php?user=u sername[/color]

    It depends on what you want to do, for making a webmail-type page,
    equal for all users but with some personalized info you should
    consider using a database (mysql could be easy) and use the username
    to retrieve that info.

    DrPollo

    Leave a comment:


  • Ian.H [dS]
    Guest replied
    Re: form posting difficulty

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Whilst lounging around on Tue, 22 Jul 2003 18:01:04 GMT, matt307
    <matt307@caroli na.rr.com> amazingly managed to produce the following
    with their Etch-A-Sketch:
    [color=blue]
    > do u know how i would go about just having one page but making the
    > page vary based on the username. such as:
    > main.php?user=u sername[/color]


    Other than that being _extremely_ insecure:


    @include("/path/to/users/files/{$_GET['username']}.php");



    HTH.



    Regards,

    Ian

    -----BEGIN PGP SIGNATURE-----
    Version: PGP 8.0

    iQA/AwUBPx2y/mfqtj251CDhEQLe ogCgorxEwzewb9U wfIXlzcC5FdMi5x 8An0U9
    MIXPruEmJfnOA/kirCqe6c+Z
    =UQbj
    -----END PGP SIGNATURE-----

    --
    Ian.H [Design & Development]
    digiServ Network - Web solutions
    www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
    Programming, Web design, development & hosting.

    Leave a comment:


  • matt307
    Guest replied
    Re: form posting difficulty

    do u know how i would go about just having one page but making the page vary based on the
    username. such as:
    main.php?user=u sername

    Leave a comment:


  • DrPollo
    Guest replied
    Re: form posting difficulty

    matt307 <matt307@caroli na.rr.com> wrote in message news:<3F1C8646. B196200B@caroli na.rr.com>...[color=blue]
    > sorry bout the html, i wasnt sure if it was required to interpret the script
    > or not. What i want to do is have the user log in and then from there be
    > directed to their own page. I wasnt sure if that form action would be
    > sufficent or if i would need something else. I know how to do all the
    > verification checks and the displaying of their results but i couldnt get how
    > to make the page display through the form verification.
    >
    > if you still dont understand let me know. i am trying to be as clear as
    > possible.[/color]

    If you want to show a certain web page according to a variable you can
    insert this on your code:

    $page = $_POST['user'].'.php';
    require_once($p age);

    This will take the name of the user from the $_POST variable and then
    insert the code of "user".php into your page. There would be a
    user1.php, user2.php, user3.php pages...

    DrPollo

    Leave a comment:


  • matt307
    Guest replied
    Re: form posting difficulty

    sorry bout the html, i wasnt sure if it was required to interpret the script
    or not. What i want to do is have the user log in and then from there be
    directed to their own page. I wasnt sure if that form action would be
    sufficent or if i would need something else. I know how to do all the
    verification checks and the displaying of their results but i couldnt get how
    to make the page display through the form verification.

    if you still dont understand let me know. i am trying to be as clear as
    possible.

    Leave a comment:


  • matt307
    Guest started a topic form posting difficulty

    form posting difficulty

    I'm doing a login form and i am trying to get it to post to a page that
    would vary based on the username given. I have figure out how to
    display all the info once it is posted. I mean i know how to select it
    from the db but other than that i'm kinda at a dead end. so far i have
    the following code snibblets:

    Form Login

    <html>
    <head>
    <title>login</title>
    </head>
    <form method="post" action="main.ph p?user=$_POST[username]">
    // basic login form here with username and then username text box and
    then password and then password box and then submit button.
    // the name of the username field is username, name of password field is
    password and then submit button field is submit.

    Display page

    info to be determined. I havent decided if i should go with a template
    or not to be based on each user or not but thats a different story lol

    thx for all ur help if u can help me.
    ~matt

Working...