Re: On-Rev Webpage variable posting
Hi Devin, Thanks for the example! It turned out I was just parsing the hidden input a little incorrectly. Your excellent example straightened me out. Thanks! Rick On Oct 19, 2010, at 1:09 PM, Devin Asay wrote: > > On Oct 19, 2010, at 10:31 AM, Rick Harrison wrote: > >> Hi Devin, >> >> Yes, I don't want to use cookies. >> >> I tried the hidden inputs technique without success. >> I'm not sure why it didn't work. Do you have an example >> of hidden inputs so I could see what I might be doing wrong? > > Rick, > > Here's a simple example I put together for my class: > > http://chum.dev.on-rev.com/teacher/makeReport.irev > ... > Devin ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: On-Rev Webpage variable posting
fields or cookies with as the preferable option. HTH, Pierre Le 19 oct. 2010 à 17:10, Rick Harrison a écrit : > > I have a webpage on On-Rev with input fields which are > posted to another webpage just fine. > > I now want to pass that posted information onto yet another > webpage before committing any of the data to > a database using .irev files. What’s the best way to do this? > > Thanks, > > Rick > > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > -- Pierre Sahores mobile : (33) 6 03 95 77 70 www.wrds.com www.sahores-conseil.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: On-Rev Webpage variable posting
On Oct 19, 2010, at 10:31 AM, Rick Harrison wrote: > Hi Devin, > > Yes, I don't want to use cookies. > > I tried the hidden inputs technique without success. > I'm not sure why it didn't work. Do you have an example > of hidden inputs so I could see what I might be doing wrong? Rick, Here's a simple example I put together for my class: http://chum.dev.on-rev.com/teacher/makeReport.irev This file uses a GET method to send data to a second file, configReport.irev. The second file in turn POSTs to a third file, displayReport.irev. File 2 has to pass along a value from File 1 to file 3, and uses a hidden input to do the job. The only reason I used GET in one form and POST in the other was to show my class an example of using each one. You can use all GETs or all POSTs if you want. Here's the relevant section from makeReport.irev: Select the Report Area: People Departments Here is the relevant stuff from configReport.irev. The "choice" input is hidden, and passes the value along from the form in makeReport.irev. Configure your " & tWhich & " report:" & return put "" & return put "" & return put "Include the following information:" & return if tWhich is "people" then put "Department " & return put "Phone Number " & return put "Office " & return else if tWhich is "department" then put "Supervisor " & return put "Dept. Phone Number " & return put "Office " & return end if put "" & return put "" put "" put "" ?> Finally, here is the relevant excerpt from displayReport.irev, with database login info sanitized: First nameLast name" into tHeader if tIncludeDept <> empty then put comma & "dept" after tQuery put "Department" after tHeader end if if tIncludePhone <> empty then put comma & "phone" after tQuery put "Phone" after tHeader end if if tIncludeOffice <> empty then put comma & "office" after tQuery put "Office" after tHeader end if else if tWhich is "department" then put $_POST["supervisor"] into tIncludeSuper put $_POST["phone"] into tIncludePhone put $_POST["office"] into tIncludeOffice put "SELECT name" into tQuery put "Dept name" into tHeader if tIncludeSuper <> empty then put comma & "supervisor" after tQuery put "Supervisor" after tHeader end if if tIncludePhone <> empty then put comma & "phone" after tQuery put "Phone" after tHeader end if if tIncludeOffice <> empty then put comma & "office" after tQuery put "Office" after tHeader end if end if put " FROM " & tWhich after tQuery # create database connection put tQuery & "" --debugging put revOpenDatabase("mysql","my.server.com","acmeco",\ "username","password") into tConnID put revDataFromQuery(,,tConnID,tQuery) into tReport revCloseDatabase tConnID put "" & return put "" & tHeader & "" & return set the itemDelimiter to tab repeat for each line tLine in tReport replace tab with "" in tLine put "" & tLine & "" & return after tFormattedRept end repeat put tFormattedRept put "" ?> Hope you find this helpful. Regards, Devin Devin Asay Humanities Technology and Research Support Center Brigham Young University ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: On-Rev Webpage variable posting
Hi Devin, Yes, I don't want to use cookies. I tried the hidden inputs technique without success. I'm not sure why it didn't work. Do you have an example of hidden inputs so I could see what I might be doing wrong? Thanks, Rick On Oct 19, 2010, at 11:21 AM, Devin Asay wrote: > On Oct 19, 2010, at 9:10 AM, Rick Harrison wrote: > >> >> I have a webpage on On-Rev with input fields which are >> posted to another webpage just fine. >> >> I now want to pass that posted information onto yet another >> webpage before committing any of the data to >> a database using .irev files. What’s the best way to do this? > > Rick, > > If you don't want to deal with cookies (I know I don't), what I always do is > just pass those values along as hidden inputs in a form. Works great. > > Devin > > > > Devin Asay > Humanities Technology and Research Support Center > Brigham Young University ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: On-Rev Webpage variable posting
On Oct 19, 2010, at 9:10 AM, Rick Harrison wrote: > > I have a webpage on On-Rev with input fields which are > posted to another webpage just fine. > > I now want to pass that posted information onto yet another > webpage before committing any of the data to > a database using .irev files. What’s the best way to do this? Rick, If you don't want to deal with cookies (I know I don't), what I always do is just pass those values along as hidden inputs in a form. Works great. Devin Devin Asay Humanities Technology and Research Support Center Brigham Young University ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
On-Rev Webpage variable posting
I have a webpage on On-Rev with input fields which are posted to another webpage just fine. I now want to pass that posted information onto yet another webpage before committing any of the data to a database using .irev files. What’s the best way to do this? Thanks, Rick ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution