print passes values
i am using insert into db(fname,lname) values ('$fname','$lname')
command i want that when this query passes on the nest page it show me which fname and which lname is passed or added like this statement
Following recorded is updat开发者_JAVA技巧ed in database successfully
first name = abc
last name = xyz
Store the query in a variable, execute and print it out:
$query = "insert into db(fname,lname) values ('$fname','$lname')";
mysql_query($query);
echo $query;
Or, if you want to print just the variables, why can't you just do:
echo 'firstname: '.$fname.' ';
echo 'lastname: '.$lname;
If this is not what you needed, please clarify your question.
$query = "insert into db(fname,lname) values ('$fname','$lname')";
if(mysql_query($query))
{
echo "Following recorded is updated in database successfully\n";
echo "first name = $fname \n";
echo "last name = $lname \n";
}
精彩评论