PHP Code to subscribe email address

Insert query in php is a MySQL query string. Data that is sent from client to server is concatenated to MySQL string and inserted to database. Here is MySQL query that is being used in php for inserting data.
Here is code snippet.

$insert = “insert into user (user_name,fullname,email,password)
values (‘”.$_POST[‘user_name’].”‘,'”.$_POST[‘name’].”‘,'”.$_POST[’email’].”‘,'”.$_POST[‘password’].”‘)”;
$insertresults = mysql_query($insert) or die(mysql_error());


here dbconnectivity.php is php file that is used for connecting to database.

Leave a Reply

Your email address will not be published. Required fields are marked *