Alex
|
Posted: 01/16/2002, 1:04 AM |
|
Sir,
I am making an appilication in which I want to insert multiple records into a table from a single form, in which the my login name is also inserted into all these inserted records.
I also want to design the intranet messaging system, in which I want to send messages to all members of the club from a single form as an administrator? How can this done in CC?
Alex
|
|
|
Emile
|
Posted: 01/16/2002, 1:56 AM |
|
Make your own sql for inserting your records: (do a copy and paste of the query CC is using). Then use the class to run the query:
PHP:
$yourSQL = "insert into.... ";
db->query($yourSQL);
Put this in your before update event of the form. And put the last query in the $sSQL variable. Don't run thatone, CC will do.
Make sure you put the if(!strlen($s<formname>Err)) arround the code, otherwise it still inserts a record when there is an error in the data of you form.
You can get your username with:
$username = dlookup("<usertable>","<field username>","user_id =".get_session("UserID"));
Or email:
$email = dlookup("<usertable>","<field email>","user_id =".get_session("UserID"));
Use the mail() function to send mail.
Good luck!
|
|
|
Manny Ramirez
|
Posted: 10/16/2003, 6:57 AM |
|
DO you have this in ASP. IF so can you provide me with the steps how to apply using ASP code.
|
|
|
|