Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. PHP

PHP

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phphtmldatabasetutorialquestion
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vinod Chandak
    wrote on last edited by
    #1

    Hi...!! I am beginner of PHP. I want to make registration page which displays user name after the successful registration. I have made three files : register.html ==> to make form and enter the data which redirects to another file called submit.php submit.php ==> to enter the values to the database and redirects to the home.php home.php ==> This must display " Welcome registering user name !" message. how to retrieve the name in the last file ??

    K S C A D 5 Replies Last reply
    0
    • V Vinod Chandak

      Hi...!! I am beginner of PHP. I want to make registration page which displays user name after the successful registration. I have made three files : register.html ==> to make form and enter the data which redirects to another file called submit.php submit.php ==> to enter the values to the database and redirects to the home.php home.php ==> This must display " Welcome registering user name !" message. how to retrieve the name in the last file ??

      K Offline
      K Offline
      Kevin Schaefer
      wrote on last edited by
      #2

      It depends on how you are submitting your form for the username and password. If you are using POST, then something like:

      $username = $_POST['username'];
      $password = $_POST['password'];

      Otherwise, if you use GET:

      $username = $_GET['username'];
      $password = $_GET['password'];

      The "username" and "password" names are whatever you named your username and password input boxes in the html form. Let me know if this helps

      1 Reply Last reply
      0
      • V Vinod Chandak

        Hi...!! I am beginner of PHP. I want to make registration page which displays user name after the successful registration. I have made three files : register.html ==> to make form and enter the data which redirects to another file called submit.php submit.php ==> to enter the values to the database and redirects to the home.php home.php ==> This must display " Welcome registering user name !" message. how to retrieve the name in the last file ??

        S Offline
        S Offline
        Satheesh1546
        wrote on last edited by
        #3

        Hi, You can post the username with the redirecting url, and from that page you can access the name by Let the redirecting URL should be like this, URL: http://localhost/home.php?user='Sunu'

        $user_name = $_REQUEST['user'];

        Cheers

        1 Reply Last reply
        0
        • V Vinod Chandak

          Hi...!! I am beginner of PHP. I want to make registration page which displays user name after the successful registration. I have made three files : register.html ==> to make form and enter the data which redirects to another file called submit.php submit.php ==> to enter the values to the database and redirects to the home.php home.php ==> This must display " Welcome registering user name !" message. how to retrieve the name in the last file ??

          C Offline
          C Offline
          cjoki
          wrote on last edited by
          #4

          After the post you cn also asign user information to a session variable so you do not need to repost it from page to page. To do this just assign the post to a session variable like...

          $_SESSION["uname"]=$_POST["uname"];

          To set and use the session values you must start your pages with...

          This brings up an important topic too. You must scrub your input from users so you can avoid sql injection (if you are storing your data in a database). Please be sure to read up on this topic in any live code you make.

          Chris J
          www.redash.org

          1 Reply Last reply
          0
          • V Vinod Chandak

            Hi...!! I am beginner of PHP. I want to make registration page which displays user name after the successful registration. I have made three files : register.html ==> to make form and enter the data which redirects to another file called submit.php submit.php ==> to enter the values to the database and redirects to the home.php home.php ==> This must display " Welcome registering user name !" message. how to retrieve the name in the last file ??

            A Offline
            A Offline
            AndyInUK
            wrote on last edited by
            #5

            Hi, You can view the tutorial here -> - http://www.youtube.com/watch?v=jdYneknFpoI[^]

            1 Reply Last reply
            0
            • V Vinod Chandak

              Hi...!! I am beginner of PHP. I want to make registration page which displays user name after the successful registration. I have made three files : register.html ==> to make form and enter the data which redirects to another file called submit.php submit.php ==> to enter the values to the database and redirects to the home.php home.php ==> This must display " Welcome registering user name !" message. how to retrieve the name in the last file ??

              D Offline
              D Offline
              DeepthiTanguturi
              wrote on last edited by
              #6

              Apply Sessions or Cookies.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups