How can I use another query to insert the question_text into a database table as shown in code below?
mysql_connect ("localhost", "root","") or die ('Error : '.mysql_error());
mysql_select_db("keyword");
$first_word = current(explode(' ', $_POST['question_text']));
$qStuff=mysql_query("SELECT c.field_name,t.category_name, d.domain_name FROM category_fields c, taxonomy_category t, taxonomy_domain d WHERE c.category_id = t.category_id AND t.domain_id = d.domain_id AND c.field_name = '" . mysql_real_escape_string($first_word) . "'");
$num_rows = mysql_num_rows($qStuff);
// some print codes here
just type:
but take care of possible mysql-injections! use mysql_real_escape_string() and see: http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php