hi...

i have 2 mysql queries....
first one:
//the extra { at the beginning and the extra , at the end of 
//each variable should be an '...
"insert into $EventsTable values(NULL, '{$_SESSION[add][type]}', 
'{$_SESSION[add][start_date]}', '{$_SESSION[add][end_date]}', 
'{$_SESSION[add][name]}', '{$_SESSION[add][county]}', '{$_SESSION[add][discription]}', 
'{$_SESSION[add][StartingDay]}', '{$_SESSION[add][StartingMonth]}', 
'{$_SESSION[add][StartingYear]}', '{$_SESSION[add][EndingDay]}', 
'{$_SESSION[add][EndingMonth]}', '{$_SESSION[add][EndingYear]}'";
and the other one:
"insert into $GuestbookTable values(NULL, '{$_SESSION[add][date]}', 
'{$_SESSION[add][name]}', '{$_SESSION[add][email]}', '{$_SESSION[add][website]}', 
'{$_SESSION[add][referred]}', '{$_SESSION[add][comments]}')";

they both use the same identical format to insert the arrays. there is an interesting 
problem though: the first one complains about use of undefined constant add - assumed 
'add' in the second query...the first one doesnt do that??

everything is set up exactly the same for both queries except the relevant 
variable/array names...

 

Reply via email to