Ok I've been working on this install program. What it does, is the user enters their information into the form and from there it is SUPPOSED to create the 2 tables in mySQL and then insert the user's data into one of them. Well, in theory it works nicely but not for me. I can't seem to figure out what to do. Maybe its just my frustration stopping me but lets have someone else look for me please.
if (isset($install)) {
$user = $_POST['user'];
$password = $_POST['pass'];
$pass = md5($password);
$email = $_POST['email'];
include("./mysql.php");
//$query1 = include("./sql/news.sql");
//$query2 = include("./sql/news_admin.sql");
mysql_query('include("./sql/news.sql")');
mysql_query('include("./sql/news_admin.sql")');
$query3 = "INSERT INTO news_admin VALUES (,'$email', '$user', '$pass')";
mysql_query($query3);
mysql_close();
echo '<p>Installion complete! Now please DELETE this file and the folder sql!</p>';
The syntax for creating the tables are in sql/news.sql and news_admin.sql as you can see. What happens when I put them as a variable is it actually shows on the screen and not in the query. So I put it in the query() itself, and it didnt show, but didnt work either. Suggestions? Comments? Concerns?. I'll check this tomorrow so don't expect an immediately reply from me.