[thelist] PHP Events Calendar - URGENT HELP NEEDED!!!

Albert Shala albert.shala at gmail.com
Mon Apr 4 08:26:14 CDT 2005


Major problem:
 I have a config.php file and it's content is:
 
<?
$version = "MySoft";
$admin_username = "****";
$admin_password = "****";

// MYSQL DB INFO
$DBHost = "localhost";
$DBName = "anything_db";
$DBUser = "*************";
$DBPass = "*********";
*$TBL_PR = "events";
*?>

here's the event_add.php file:

<? 
if(isset($_POST['submit'])){ 
require_once("config.php"); $db_connection = mysql_connect ($DBHost, 
$DBUser, $DBPass) OR die 
(mysql_error()); 
$db_select = mysql_select_db ($DBName) or die (mysql_error()); 
*$db_table = $TBL_PR = "events"; 
*
$sql = "INSERT INTO *$db_table* (`event_day` , `event_month` , `event_year` 
, `event_time` , `title` , `description`) VALUES ('".$_POST['day']."', 
'".$_POST['month'] . "', '".$_POST['event_year'] . "', '" . $_POST['hour'] . 
":" . $_POST['minute'] . "', '" . $_POST['title']."', 
'".$_POST['description']."')";

mysql_query($sql) or die(mysql_error()); 
$_POST['month']++;
?> 

See the above highlighted text, can anyone tell me how would i need to 
declare another table, i think it would be done in *config.php *so that i 
can insert into another table, exmple would be into departments and all, but 
i can't add info into a second table help is required.

Also can i do a select stament like this: SELECT * FROM $*db_table1*, *
$db_table2*, *$db_table3*

*Thanks*


More information about the thelist mailing list