How can i make like my account creation page connect to my PC MySQL, from a paid host?
im using Servage
Please will +rep
How can i make like my account creation page connect to my PC MySQL, from a paid host?
im using Servage
Please will +rep
5 views and no one can help?
Well, you'd use the mysql_connect function.
..where host is most likely the ip to your server, user is probably root, but could be different if you've changed it, and password is something you've set yourself. Database is the name of the database that you chose when you created the database.Code:$connection = mysql_connect(HOST, USER, PASS); mysql_select_db(DATABASE, $connection);
Hope this helps for you
Last edited by Tanax; 03-19-2009 at 03:03 AM.
Hm.
You should read php/mysql basic's![]()
if (isset($_POST['username']) && strlen($_POST['username']) > 0 &&
isset($_POST['password']) && strlen($_POST['password']) > 0) {
$db=mysql_connect("localhost", "USERNAME", "YOURPASSWORD") or die(mysql_error());
mysql_select_db("jakobsen",$db) or die(mysql_error());
$userarray = mysql_query ("SELECT * FROM SOMEPLACE WHERE username='$test'") or die(mysql_error());
$row = mysql_fetch_array($userarray);
mysql_close();
if ($row[password] == $_POST['password']) {
$_SESSION['user'] = $row[id];
header("Location: http://anylocation");
If you know a little about it then this might help