Jump to content

COnnect To MySQL Problem...


suigion

Recommended Posts

Hi All,

 

I am new in PHP. I try to insert data into MySQL Table, table name is "member".But, nothing happen. The table still contains 0 row.

Here is the code:

 

<?php

$user = $_POST["username"];

$email = $_POST["email"];

$password = $_POST["password"];

 

$db = mysql_connect("localhost","root","suigion");

mysql_select_db("blogzone",$db);

$sql = "INSERT INTO member(Username, Email, Password) VALUES ('$user','$email','$password')";

mysql_query($sql,$db);

mysql_close($db);

 

?>

 

Can anyody tell me what's wrong with the code???

Thanks in advance...

Link to comment
https://forums.phpfreaks.com/topic/65840-connect-to-mysql-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.