I am trying to access my database and add and pull from it and I am having problems...I may be going about it the wrong way... if someone can help, please do.
I am using PHPmyAdmin to create my tables. I have one table called students with 3 rows (name, email, id)
I have 2 php files, one to gather id, name and email, the other to display them.
the first is just a form that gets:
<form name="form1" method="post" action="db_processor.php">
qname, qemail and qid
the second db_processor.php
<?php
$db = mysql_connect("mysql.ece.ncsu.edu", "enculcate", "*****");
mysql_select_db("enculcate");
mysql_query("INSERT FROM students WHERE name=$qname");
mysql_query("INSERT FROM students WHERE name=$qemail");
mysql_query("INSERT FROM students WHERE name=$qid");
mysql_close($db);
?>
first of all , I dont know whether that is right, to insert into database, and I also want to show the database and I dont know how to do that.... could someone give me some help.
Thanks.