Thread: help

Results 1 to 3 of 3
  1. #1
    42trojan42's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    81
    Reputation
    10
    Thanks
    16
    My Mood
    Devilish

    Unhappy help

    Hey i'm working on a register form in html and php that send information of registration to Databases but the code won't work
    Code:
    <?php
    
    $mysql_hostname = "***";
    $mysql_username = "***";
    $mysql_password = "****";
    $mysql_database = "*****";
    $db = mysql_connect ($mysql_hostname, &mysql_username, &mysql_password);
    
    or die("404 xD");
    
    mysql_select_db($mysql_database, &db) or die("error");
    
    
    
    
    
    ?>
    Index:
    Code:
    <hmtl>
    <head>
      <?php
    include('****.php')
    
    
    $fullname = @&_POST['fullname'];
    $username = @&_POST['username'];
    $password = @&_POST['password'];
    $Register = @&_POST['Register'];
    
    if($Register)
    {
    $insert = mysql_query ("INSERT INTO users VALUES ('','$fullname','$username','$password')")
    or die ("Error");
    }
    
    ?>
      <body>
        <form method ="post">
          Fullname:<input name="fullname" type="text"><br>
          username:<input name="username" type="text"><br>
          password:<input name="password" type="password"><br>
          <input type="submit" name="Register" value="Submit">
        </form>
      </body>
      </head></hmtl>
    Please help me the information won't send to database

  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    close the < head > section before opening the < body > section

    and access the php POST variable with $_POST , not @&_POST
    https://php.net/manual/en/reserved.variables.post.php
    Last edited by abuckau907; 09-29-2014 at 10:22 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. The Following User Says Thank You to abuckau907 For This Useful Post:

    42trojan42 (09-29-2014)

  4. #3
    42trojan42's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    81
    Reputation
    10
    Thanks
    16
    My Mood
    Devilish

    Talking

    Quote Originally Posted by abuckau907 View Post
    close the < head > section before opening the < body > section

    and access the php POST variable with $_POST , not @&_POST
    https://php.net/manual/en/reserved.variables.post.php
    Thx dude its working now

Similar Threads

  1. [Help Request] Combat arms Vid help
    By djw111 in forum Combat Arms Help
    Replies: 4
    Last Post: 12-24-2011, 05:06 PM
  2. [Help Request] AFK Bot [help]
    By fet in forum Combat Arms Help
    Replies: 7
    Last Post: 04-28-2011, 03:17 AM
  3. [Help Request] Injector Admin help
    By asdfgas in forum Combat Arms Help
    Replies: 4
    Last Post: 04-27-2011, 06:12 PM
  4. [Help Request] Ajuda / Help
    By - Battery' in forum Combat Arms BR Coding Help
    Replies: 3
    Last Post: 04-22-2011, 07:15 PM
  5. [Help Request] Help my!
    By Windowns7 in forum Combat Arms BR Coding Help
    Replies: 2
    Last Post: 04-18-2011, 01:41 PM