Ask a Question related to Dreamweaver AppDev, Design and Development.
-
brianevans5179 #1
Insert Record and pass url variables
Using PHP and MySQL, I want to set up a form that inserts a new record into the
database, and on the redirect page, i want it to have a url variable with the
"id" of the record so it can pull up that information on the second page - like
a confirmation page.
Any ideas?
brianevans5179 Guest
-
CF pass variables to Flash
Hello: Basically I want Coldfusion to pass the server date to Flash. But I get '#theDt#' instead of the value of 'theDt' please see the code... -
Insert record
Hi all, I'm having a bit of a problem at the moment. I'm basically trying to insert a record to a MS Access database. I'm using dreamweaver MX. What... -
How to insert a new record
I am having problems with inserting a new record into access database using the detailsview control, the autonumber of the control does not update... -
Can one pass variables through a selector?
In article <clund-50F2A4.12443709092003@amstwist00.chello.com>, C Lund wrote: Yes - either use an NSInvocation to perform the call, or call... -
how to pass in list and insert them one by one
Hi, I have a parameter that pass in list to store procedure, for example, '21, 34, 254,3e3' how am I able to split it and insert one by one... -
brianevans5179 #2
Re: Insert Record and pass url variables
How about an 'Insert Record and Set Cookie" - how would i do that?
brianevans5179 Guest
-
Jeremy #3
Re: Insert Record and pass url variables
don't know about php i know asp but this may help"
look for this:
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "form1") Then
And insert this:
Session("AnySessionName") = Request("NameOfHiddenFieldWithTheIdBoundToIt")
so it looks like this:
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "form1") Then
Session("AnySessionName") = Request("NameOfHiddenFieldWithTheIdBoundToIt")
this will create a session named "AnySessionName" with the value of the
hidden field, upon record insert
you can retrieve that session on another page.
or go to
Bindings > + > session variable
Jeremy Guest
-
Alexandro Colorado #4
Re: Insert Record and pass url variables
On Wed, 30 Mar 2005 00:21:16 +0000 (UTC), brianevans5179
<webforumsuser@macromedia.com> wrote:
You can use ImpAKT which is an extension we made to do this processes> Using PHP and MySQL, I want to set up a form that inserts a new record
> into the
> database, and on the redirect page, i want it to have a url variable
> with the
> "id" of the record so it can pull up that information on the second page
> - like
> a confirmation page.
>
> Any ideas?
>
almost automatically. Check the flash demo's to see the speedness of it:
[url]http://www.interaktonline.com/Products/Dreamweaver-Extensions/ImpAKT/Overview/[/url]
--
Alexandro Colorado
------------------------------
Support Engineer
InterAKT Online
[url]http://www.interaktonline.com[/url]
Tel: 40(21) 312.5312
Alexandro Colorado Guest
-
David Powers #5
Re: Insert Record and pass url variables
brianevans5179 wrote:
It's very simple, but requires a little digging in Code view. Locate the> Using PHP and MySQL, I want to set up a form that inserts a new record into the
> database, and on the redirect page, i want it to have a url variable with the
> "id" of the record so it can pull up that information on the second page - like
> a confirmation page.
SQL statement that inserts your data into the database. It will begin with:
$insertSQL = sprintf("INSERT INTO
A few lines further down, you will see something like this (the names of
the variables are likely to be different, but the pattern will be the same):
$Result1 = mysql_query($insertSQL, $myConn) or die(mysql_error());
$insertGoTo = "mynewpage.php";
Change those lines like this:
$Result1 = mysql_query($insertSQL, $myConn) or die(mysql_error());
$theID = mysql_insert_id();
$insertGoTo = "mynewpage.php?id={$theID}";
This will send the ID as a query string to mynewpage.php. You can then
use the ID to create a Recordset containing the details of the record
you have just inserted. Set Filter in the Recordset dialog box to the
name of your primary key, select = URL Parameter and type "id" into the
box next to URL Parameter.
--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
[url]http://computerbookshelf.com[/url]
David Powers Guest
-
brianevans5179 #6
Re: Insert Record and pass url variables
Thanks David. That was just want I was looking for. Your The Man! Works
Great!
Originally posted by: Newsgroup User
brianevans5179 wrote:the> Using PHP and MySQL, I want to set up a form that inserts a new record intothe> database, and on the redirect page, i want it to have a url variable withlike> "id" of the record so it can pull up that information on the second page -It's very simple, but requires a little digging in Code view. Locate the> a confirmation page.
SQL statement that inserts your data into the database. It will begin with:
$insertSQL = sprintf("INSERT INTO
A few lines further down, you will see something like this (the names of
the variables are likely to be different, but the pattern will be the same):
$Result1 = mysql_query($insertSQL, $myConn) or die(mysql_error());
$insertGoTo = "mynewpage.php";
Change those lines like this:
$Result1 = mysql_query($insertSQL, $myConn) or die(mysql_error());
$theID = mysql_insert_id();
$insertGoTo = "mynewpage.php?id={$theID}";
This will send the ID as a query string to mynewpage.php. You can then
use the ID to create a Recordset containing the details of the record
you have just inserted. Set Filter in the Recordset dialog box to the
name of your primary key, select = URL Parameter and type "id" into the
box next to URL Parameter.
--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
[url]http://computerbookshelf.com[/url]
brianevans5179 Guest
-
David Powers #7
Re: Insert Record and pass url variables
brianevans5179 wrote:
Glad to have been of help, Brian.> Thanks David. That was just want I was looking for. Your The Man! Works
> Great!
--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
[url]http://computerbookshelf.com[/url]
David Powers Guest



Reply With Quote

