|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Ajax reponse to Insert
Hi,
Does anyone have an example of an insert from an ajax response, I have an output as PHP Code:
and need to insert into a db PHP Code:
Thanks |
|
#2
|
|||
|
|||
|
Try a complete explanation. Your question doesn't make sense to me.
In general, if you wanted to do an ajax transaction to a db on the server you'd: - Gather up whatever data you want to insert in the db - Create an xmlhttp object in the browser - Use the xmlhttp object to post the data to a receiving asp page on the web server (oh yeah, you've gotta write that page too) - Have the asp page extract and format what you want to insert, have it connect to the db and perform the insert.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Doug,
Thanks for your reply, I know how to insert a single record into a db: i.e. if it was just one: PHP Code:
but do not know how to do this for an array PHP Code:
Any help please. |
|
#4
|
|||
|
|||
|
One way is to loop through the array and do a single insert for each record, which is probably the way I'd do it. Beyond that your questions is pretty much a sql question it seems.
|
|
#5
|
|||
|
|||
|
Thanks Doug,
I will create the loop. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Ajax reponse to Insert |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|