Jump to content

Recommended Posts

hey i need help im tryig to get information from my user and then process it in my database so i can use it to log them to a different web site im trying to use this method to get the information from the user but need help to get it please help me.

  //make the database connection.
        $conn = mysql_connect("localhost", "Black Jack");
        mysql_select_db("chaper7", $conn);
        
        //create a query
        
        $sql = "SELECT * FROM hero";
        $result = mysql_query($sql, $conn);

Link to comment
https://forums.phpfreaks.com/topic/237828-database-connection/
Share on other sites

 

im trying to make this code get the his name and from the user to store in he database and use to acces the website as well

 

 

<?php

               

              //make the database connection.

        $conn = mysql_connect("localhost", "Black Jack", "password");

        mysql_select_db("chaper7", $conn);

       

        //create a query

       

        $sql = "SELECT * FROM hero";

        $result = mysql_query($sql, $conn);

       

    print <<<HERE

  Intro Page To Black Jack

ID: <input type="text" name="ID" /><br />

First name: <input type="text" name="firstname" /><br />

Last name: <input type="text" name="lastname" />

User Name: <input type="text" name="Username" /><br />

Password: <input type="text" name="password" /><br />

Age: <input type="text" name="Age" />

<input type="submit" name="Play Black Jack" />

HERE;

   

        ?>

Link to comment
https://forums.phpfreaks.com/topic/237828-database-connection/#findComment-1222275
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.