CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Inserting Multiple Records from a single form

Print topic Send  topic

Author Message
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.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.