<?php
$connect=mysql_connect("localhost","root","") or die(mysql_error()."Cannot find Database");
mysql_select_db("cubicle",$connect);
$insert_query='insert into registry(username,password,firstname,lastname,eid) values ("'.$_POST'","'.$_POST'","'.$_POST'","'.$_POST'","'.$_POST'")';
mysql_query($insert_query);
?>
ruchit
0
Newbie Poster
Recommended Answers
Jump to PostYou are missing . (period) to concatenate strings (note the . after $_POST)
$insert_query='insert into registry(username,password,firstname,lastname,eid) values ("'.$_POST['uname'].'","'.$_POST['pass'].'","'.$_POST['fname'].'","'.$_POST['lname'].'","'.$_POST['email']'")';
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.