jdproject Posted May 29, 2011 Share Posted May 29, 2011 I am creating a member site and I need help with coding the database. Here go the code <?php function connect(){ $DB_USER = "root"; $DB_PASSWORD = ""; $DB_HOST = "localhost"; $dbc = mysql_connect ($DB_HOST, $DB_USER, $DB_PASSWORD) or $error = mysql_error(); mysql_select_db("membership") or $error = mysql_error(); mysql_query("SET NAMES `utf8`") or $error = mysql_error(); if($error){echo "<!-- $error -->";}} function disconnect_data(){ @mysql_close($dbc); @mysql_close(); } ?> I am suppose to fill it in with my database info but idk what to fill in! help me please! where do i enter the info! Quote Link to comment https://forums.phpfreaks.com/topic/237754-urgent-help/ Share on other sites More sharing options...
trq Posted May 29, 2011 Share Posted May 29, 2011 The info is stored within the $DB_USER, $DB_PASSWORD and $DB_HOSTNAME variables. Be aware that your disconnect_data() function references a variable $dbc, this variable does not exist within the function and will cause an error. Quote Link to comment https://forums.phpfreaks.com/topic/237754-urgent-help/#findComment-1221786 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.