nataratafata Posted May 30, 2011 Share Posted May 30, 2011 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); Quote Link to comment https://forums.phpfreaks.com/topic/237828-database-connection/ Share on other sites More sharing options...
mikesta707 Posted May 30, 2011 Share Posted May 30, 2011 um, what information are you trying to get and what does your script have to do with it? Do you need some information from the here table? Your problem is unclear and as such, I can not offer any help Quote Link to comment https://forums.phpfreaks.com/topic/237828-database-connection/#findComment-1222159 Share on other sites More sharing options...
nataratafata Posted May 30, 2011 Author Share Posted May 30, 2011 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; ?> Quote Link to comment https://forums.phpfreaks.com/topic/237828-database-connection/#findComment-1222275 Share on other sites More sharing options...
fugix Posted May 30, 2011 Share Posted May 30, 2011 You will need to process the user data and insert it into your db using an insert clause Quote Link to comment https://forums.phpfreaks.com/topic/237828-database-connection/#findComment-1222304 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.