Problem extracting variables passed through a url
Hi I'm trying to pass two variables via a url which I can acheive, but I'm having trouble extracting the information when page refreshes.
This is the code I've used to pass the variables:_
<?php while ($row = mysql_fetch_assoc($result1)) { ?>
<a href="<?php echo $_SERVER['PHP_SELF'];?>?gallery_id=<?php echo $row['gallery_id']; ?>&year_id=<?php echo $row['year_id'];?>"><?php echo $row['name']; ?></a>
<?php } ?>
I'm able to acheive the my objective when on variable is passed using the following code:-
if (array_key_exists('gallery_id', $_GET)) {
$gallery_id = $_GET['gallery_id'];
My question is, how do I do this with two (or more) variables? I need to extract $year_id as well.
Thanks.
Thanks for the reply.
I get the following notice.
Notice: Unidentified index: gallery_id in ......
I'm trying to create a photo gallery that displays years at the top, the gallery names for the relevant year in the left hand pane and the relevant photos for a particular gallery in the right hand pane. I have nearly acheived the aim in that everything will initially display ok and when a different year is selected and the page reloads, it will list the galleries for that year and display the photos for the first gallery in the list.
The problem is that when a new gallery is selected I am able to pass the new gallery_id and the year_id when the page reloads, but I can't extract both results using If(array_key_exists and since the script needs both to function I'm a bit stuck.
What i really want to do is something like If(array_key_exists('year_id', 'gallery_id', $_GET)) {
but this won't work! Is it possible to do it this way or am I barking up the wrong tree?
Thanks.
Similar Messages
-
I think this is a bug. Any information about this will be greatly appreciated. Here's the scenario:
There's a single page with 2 regions. The first region contains a simple SQL report. The second region is and HTML region that contains text and date form elements. The SQL report has a column link "Edit" that when pressed it populates form elements in the HTML region. The population of the form elements is done by passing the column values of the select row as variables along the URL. The problem is that commas within column value text are processed as delimiters in the URL. From my understanding and documentation, variables and their values are supposed to look like this:
f?p=6000:6004:&APP_SESSION.::NO:6003:MY_ITEM1,MY_ITEM2,MY_ITEM3:1234,,5678
where MY_ITEM1 will be set to 1234, MY_ITEM2 will be set to null and MY_ITEM3 will be set to 5678 (The URL was copied directly from the Apex 3.0 documentation without modification).
However if the first value is text (lets say "some,thing") that contains a comma, then MY_ITEM1 will be set to the text preceding the comma in the first value (some), the MY_ITEM2 will be set to the text that comes after the comma in the first value (thing) NOT null and MY_ITEM3 will be set to null NOT 5678. Clearly, one would think that the comma in the first value should be escaped given that commas are used as delimiters of values in this URL scheme.
The URL looks like this:
f?p=6000:6004:&APP_SESSION.::NO:6003:MY_ITEM1,MY_ITEM2,MY_ITEM3:some%2Cthing%2C%2C5678
However the URL should look like this:
f?p=6000:6004:&APP_SESSION.::NO:6003:MY_ITEM1,MY_ITEM2,MY_ITEM3:some%2Cthing,,5678
where MY_ITEM1 is set to "some,thing", MY_ITEM2 is null and MY_ITEM3 is set to 5678
What does all this mean? This means that the escaped commas (%2C) are used as delimiters for the values. Additionally, any information that is passed that contains a comma will have it's comma escaped as well AND still considered as delimiters for values in the URL. Not to mention it's inconsistent with the official documentation.Never mind... problem solved.
In the Apex docs says that you can embed commas if used within backslashes like: \123,45\.
So in order to pass text that has a comma through the URL, one must force Apex to code the URL like this (assuming that the text is coming from a report):
f?p=6000:6004:&APP_SESSION.::NO:6003:MY_ITEM1,MY_ITEM2,MY_ITEM3:\#A_COLUMN#\,,5678
Sorry... no bug. :) -
One screen presentation problem on calls pass through cube
hello all,
may I have your advices about following problem;
this is flow diagram: cts codec (site A) -- >> cube -->> cts codec (site B)
if the codec in the site B is one screen as cts 1100 the presentation cant be shared bidirectional.
however if it is 3 screen as cts 3010 the presentation works fine.
this is the part of config:
voice service voip
ip address trusted list
ipv4 X.X.X.X
ipv4 X.X.X.X
rtp-ssrc multiplex
address-hiding
allow-connections sip to sip
redirect ip2ip
fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none
sip
session transport tcp
rel1xx disable
header-passing
early-offer forced
midcall-signaling passthru
pass-thru headers unsupp
pass-thru content sdp
sip-profiles 1
copy-list 1
voice class codec 1
codec preference 1 aacld profile 1
codec preference 2 g722-64
codec preference 3 g711ulaw
video codec h263+
video codec h264 profile 2
video codec mpeg4
voice class sip-profiles 1
request INVITE peer-header sip Contact copy "(;video;audio;x-cisco-tip;x-cisco-multiple-screen=3)" u01
request INVITE sip-header Contact modify "$" "\u01"
dial-peer voice X voip
destination-pattern X...
video codec h264 profile 2
rtp payload-type cisco-codec-fax-ack 126
rtp payload-type cisco-codec-fax-ind 110
rtp payload-type cisco-codec-aacld 96
rtp payload-type cisco-codec-video-h264 112
session protocol sipv2
session target ipv4: X.X.X.X
voice-class sip bind control source-interface GigabitEthernet0/0xxx
voice-class sip bind media source-interface GigabitEthernet0/0xxx
codec aacld profile 1hi
you have any string as
voice class sip-profiles 1
request INVITE peer-header sip Contact copy "(;video;audio;x-cisco-tip;x-cisco-multiple-screen=3)" u01
request INVITE sip-header Contact modify "$" "\u01"
change it with
request INVITE peer-header sip Contact copy "(;video;audio;x-cisco-tip;x-cisco-multiple-screen=*)" u03
request INVITE peer-header sip Contact copy "(;video;audio;x-cisco-tip;x-cisco-multiple-screen=(.*))" u03
request INVITE sip-header Contact modify "$" "\u03"
it will work. -
Problem in sql pass through query
i am using the following query:
select * from table_name where item IN (?0) and item1 IN (?1)
i am creating sqlPassthroughQuery but i am getting : Missing right parenthesis /Query not terminated properly exception
but the query is working without where clause and it is working also if i am not using query without parameters i.e.
select * from table_name where item IN ('itemvalue1','itemvalue2') and item1 IN ('itemvalue1','itemvalue2')
Any pointers will be useful
PrakharHi,
i used the query like this:
String query="Select * from table_name where col1 IN(?,?,?) and col2 = ?";
Object params[] = new Object[4];
params[0] = "val1";
params[1] = "val2";
params[2] = "val3";
params[3] = "val4";
Builder builder = (Builder)view.getQueryBuilder();
Query sqlQuery = builder.createSqlPassThroughQuery(query,params);
RepositoryItem[] items = view.executeQuery(sqlQuery);
This is just a basic example.You can get more info @ATG Repository Guide.
Prakhar -
I have a form where the user has an option of clicking submit
which submits the entire form or select a some abcdefg... which
submits the selected alpha and passes through a URL. The problem
now is that I want the user to select a radio button which tells me
the DB they want to search.
How wiould I pass the value of the radion button through url
to know the users seacr option?
I Need to put the value from the javascript in the URL and pass
the Value to the next form
<a href="/admin/Leadsresult.cfm?search=a" onclick="return
checkradio();">A</a>
This my script which I want to submit the value when user
clicks the above
function checkradio()
var check =document.b.criteria.value;
if (check ==1)
document.b.checkoption.value ='Cp';
else
document.b.checkoption.value ='Cb';
document.form.action="sult.cfm";
document.form.submit();*/
}quote:
Originally posted by:
umuayo
The form fields are not being submitted when you click on the
hyperlinked data.
It only get submitted when you use the Submit button.
Oh, I missed that part. I'm not sure, but I don't think you
can use js to change variables in an anchor tag after the page has
been loaded. Have you considered using two links instead of one? -
Passing Parameters through a URL to a Report..
I have noticed a lot of message about similar situations where people have had problems sending certain parameters through a URL.. so this is maybe something that's not possible.. but you if you dont ask then you dont know.
so..
We have a form that has search options in it
(its a customized form that replaces the customization bit that you get with a report -> .show_parms - just so we could do different things with it)
and one of the fields is a combobox populated by an LOV
- it has usernames in it
so when you search using a value in the combobox it will show all the records that that person has entered into the table..
however we are currently getting an error
Error: An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)
this is the URL with the parameters
http://portal.somewhere.com/pls/portal30/foldername.RPT_Edit_Request_Old.show?p_arg_names=Request.RID&p_arg_values='||nRID||'&p_arg_names=Request.CID&p_arg_values='||nCID||'&p_arg_names=Request.ATID&p_arg_values='||nATID||'&p_arg_names=Request.REQUEST_NAME&p_arg_values='||nREQNM||'%&p_arg_names=_request_rid_cond&p_arg_values=%3D&p_arg_names=_request_cid_cond&p_arg_values=%3D&p_arg_names=_request_atid_cond&p_arg_values=%3D&p_arg_names=_request_request_name_cond&p_arg_values=LIKE';
when you remove the condition at the end
the report is displayed (but not customized obviously)
however you can see the value has been picked up from the combobox as it's in the URL in the address bar..
so that bit works fine
any thoughts/ideas/or even solutions! :) would be much appreciated
thanks
Richardactually
nevermind
i got it to work without even knowing :)
the condition was causing the error
and adding a % after the value makes it work -
Passing variable as an input parametere to a transaction through an url;
hi ,
I am calling a transaction through an url into which i want to pass the input parametere to the transaction as an variable; my question is
is it possible? if yes then how?Hi Diana ,Thanks for taking intrest in my question . I hav already gone through that link which you have given, what my question is that,
consider this ex. given below
Transaction=Test/YieldCalc&YieldFactor=10.0&OutputParameter=YieldAverage.
in the above call i am passing 10.0 as input to the parameter YieldFactor .
what i want to do is to store this value of 10.0 in a variable and then pass this variable to the parameter YieldFactor,
say,
var xxx=10.0;
Transaction=Test/YieldCalc&YieldFactor="xxx"&OutputParameter=YieldAverage.
I have tried like this but it didnt worked.
is it possible ?
how? -
Problem in passing Modified date through Go url
Hi All
I am trying to pass parameters through url to report.
Its working fine and passing row id of the record but when i try to pass modified date also, it takes me to no result view where i can see that value has been passed to report but the results are not filtered, instead no result view.
While passing date in url as parameter do we have extra consideration?
Anybody has faced smilar kind of scenario.I am getting the following error when trying to pass modified date for oppty.
Error getting drill information: SELECT Opportunity.Name saw_0, Opportunity."Opportunity ID" saw_1, Opportunity."Sales Type" saw_2, Opportunity.Priority saw_3, Opportunity."Last Modified" saw_4 FROM "Opportunity Lists" WHERE (Opportunity."Opportunity ID" = 'AAPA-6EEC9X') AND (Opportunity."Last Modified" = timestamp '0000-00-00 00:00:00')
Error Details
Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
Odbc driver returned an error (SQLExecDirectW).
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46048] Datetime Month value 0 from 0000-00-01 is out of range. (HY000)
SQL Issued: {call NQSGetLevelDrillability('SELECT Opportunity.Name saw_0, Opportunity."Opportunity ID" saw_1, Opportunity."Sales Type" saw_2, Opportunity.Priority saw_3, Opportunity."Last Modified" saw_4 FROM "Opportunity Lists" WHERE (Opportunity."Opportunity ID" = ''AAPA-6EEC9X'') AND (Opportunity."Last Modified" = timestamp ''0000-00-00 00:00:00'')') -
Passing variables through the URL String
I have a template and outside the basic html - all the content is grabbed from a db. I want to use 1 template to generate all of the other pages for the site. So basically, the only way to identify the page would be through the URL string.
So, something like -
www.mysite.com/template.jsp?page_section=aboutus&pageID=1
That string would query the database and output the content for page 1 of the about section.
Does this make sense and where would I start to learn how this is done?.
Again, I appreciate your help.
Marksince database connections are costly affair i better use
jsp include tag ratter then getting dadta from database
assumming that u can devide your comman pages in 4 parts
just assume
top - logo
bottom - common links
center - data
left - menu
my jsp page would look like this (aboutus.jsp)
<%@ include file="top.html" %>
<%@ include file="left.html" %>
<%@ include file="aboustus.html" %>
<%@ include file="bottom.html" %>
2) disclaimer.jsp
<%@ include file="top.html" %>
<%@ include file="left.html" %>
<%@ include file="disclaimer.html" %>
<%@ include file="bottom.html" %>
this would reduce ur maintainnce as if u want to change top logo only top.html needs to be changed and it would affect in all pages
regards
[email protected] -
Passing 2 varibles through a URL
I don't know how to pass 2 variables through a URL. I am
familiar with ASP
but it doesn't work the same. Please help
<cflocation
url="payment.cfm?username=#FORM.username#&email="#FORM.email#"">
Wally Kolcz
Developer / SupportIt looks like you've got an extra set of quotes:
Take out the double quotes around #FORM.email#
I think that will solve the problem you are having with them
not showing up in the hidden form fields as well. -
Passing prompt filters through an URL
My report has very long results table.
The user ask to have, instead of the table view (which sometimes crashes the browser), a way to execute the report and download it to xls.
I want to add section in the page, below the prompts, which will display the user a URL link to this report.
I've read that I can add in the end of the URL the xls format: https://myip/analytics/saw.dll?Go&Path=mypath&format=XLS
The issue is how to pass the presentation variables, which the report require.
For example, the report has filter:
day>@{p_day}
The p_day is populated by the prompt in the upper side of the page, when the URL link should appear.
I read the http://gerardnico.com/wiki/dat/obiee/url_filter, where he mentioned the case of 'Data Quality Metrics is prompt', but he didn't show the solution.
How can I pass the presentaiton variable value in the URL link?Nir,
You should really search through the forums before posting your questions as this/similar question has been answers a few times.
But I'll take the points that you are going to award me though for providing you with the information and answer to your question. : )
Towards the bottom of this blog post you will find the answer you seek on how to pas the presentation variables in the URL,
http://www.iwarelogic.com/blog/integrating-oracle-obiee-content-using-go-url-850
Other Forum Threads:
Filter a dashboard prompt using GO URL
Code snippet from iwarelogic's blog post:
You can also pass Presentation variable in form @{variable_name} as a filter using GOURL.
And static variable in form VALUEOF(static_var_name)
Ex :
'<a href=http:// '||VALUEOF(domain_name)|| ' :9704/analytics/saw.dll?GO&path=/shared/Operational%20Reports/Scorecard&Options=d&Action=Navigate&P0=3&P1=eq&P2=%22Reporting%20Line%22.%22Reporting%20Line%20Domain%22&P3='||REPLACE("Reporting Line"."Reporting Line Domain",' ','%20')|| '&P4=eq&P5=Geography.Dominion&P6='||REPLACE('@{DominionPromptVar',' ','%20') ||'&P7=eq&P8=Geography.%22Country%20Name%22 &P9='||REPLACE('@{CountryNamePromptVar}',' ','%20') ||'>' || Link || ''
Note : Passing Parameters to the Report using GO URL is optional argument
Cheers,
Christian
http://www.artofbi.com -
Environment variables not passed through to player in flexunit 4.1.0-beta3
fyi, to get flexunit-4.1.0-beta3 FlexUnit4AntTasks invocation of flashplayer to not be rejected by the vncserver, i needed to modify the FlexUnitLauncher to pass through the environment variables to the command environment.
the reason this is required, i think, is the use of Runtime.exec() directly in CustomPlayerCommand -- in flexunit-4.0.0, the same function was accomplished using the ant executor, which does passthrough by default.
anyway, curious if anyone else has seen this issue, or if i'm doing something dumb.
--- flexunit/flexunit-4.1.0-beta3/flexunit-flexunit-da29198/FlexUnit4AntTasks/src/org/flexuni t/ant/launcher/FlexUnitLauncher.java (revision 7250)
+++ flexunit/flexunit-4.1.0-beta3/flexunit-flexunit-da29198/FlexUnit4AntTasks/src/org/flexuni t/ant/launcher/FlexUnitLauncher.java (revision 7251)
@@ -79,7 +82,13 @@
command.setSwf(swf);
if (runHeadless())
- command.setEnvironment(new String[]{ "DISPLAY=:" + xvncStart.getCurrentDisplay() });
+ Map<String, String> env = System.getenv();
+ List<String> envArgs = new ArrayList<String>();
+ for (Map.Entry<String, String> entry : env.entrySet()) {
+ envArgs.add(entry.getKey() + "=" + entry.getValue());
+ }
+ envArgs.add("DISPLAY=:"+xvncStart.getCurrentDisplay());
+ command.setEnvironment(envArgs.toArray(new String[0]));
LoggingUtil.log("Setting DISPLAY=:" + xvncStart.getCurrentDisplay());ok. i went looking for a JIRA link somewhere around here and couldn't find it. do you have a URL handy?
there are a couple of other things too:
you probably want trustDirectory.mkdirs() rather than mkdir() in TrustFile.java
you probably want CustomPlayerCommand.setLocalTrusted() -- my player command isn't in the machine's path, but i still want to be able to touch the trust file. So I copied the trustFile.add() stuff from FlashPlayerCommand.launch() into CustomPlayerCommand.launch(). probably a better solution would be refactoring CustomPlayerCommand to be more like FlashPlayerCommand.
anyway, if you want patches, tell me where to put them and i'll post some. -
How to pass session variable value with GO URL to override session value
Hi Gurus,
We have below requirement.Please help us at the earliest.
How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
Please provide step by step solution.No vague answers.
I followed below steps mentioned.
RPD:
****-> Created a session variable called STATUS
-> Create Session Init block called Init_Status with SQL
select 'ACTIVE' from dual;
-> Assigned the session variable STATUS to Init block Init_Status
authenticationschemas.xml:
Added
<RequestVariable source="url" type="informational"
nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
Report
Edit column "Contract Status" and added session variable as
VALUEOF(NQ_SESSION.STATUS)
URL:
http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
Issue:
When I run the URL above with parameter EXPIRED, the report still shows for ACTIVE only. The URL is not making any difference with report.
Report is picking the default value from RPD session variable init query.
could you please let me know if I am missing something.Hi,
Check those links might help you.
Integrating Oracle OBIEE Content using GO URL
How to set session variables using url variables | OBIEE Blog
OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
Thanks,
Satya -
Problem with "Pass Through Chapters" Theme
I was searching old post to get some help and this one help a little but there was still one problem unanswered. I have highlighted in red;
Nov 14, 2008 3:41 PM Re: Pass Through Theme problem
Re: Pass Through Theme problemin response to Glo H
My smaller text which appears in white says Scenes 1-6. The pass through text which is larger and has a different image in it says "Pass Through Chapters" and it rolls by while the smaller text stays put. I notice the image that shows through the pass through text is the same image I set on the main DVD screen. On that one my name of my disc roll past in giant see through letters. I like that but I just don't want that same effect on my chapters screens.
Can the image behind the rolling text be changed to the current window and not the main menu image?Thanks for the tip and figured out to delete my "Scenes 1-6" that was automatically created when, in iMovie, I shared the movie to iDVD with chapters. The menu title text block doesn't like cut/paste and I had to retype the "Scenes 1-6" text for the motion/peek-through scrolling text to refresh.
Hmmm, but how tricky is that and where is it mentioned in the help/faq files etc?
cheers -
Pass the product ID through the URL from the checkout page to the "receipt - buy" landing page. is it possible?
You can just the module_shoppingcartsummary module and with liquid you can render the items in the cart out.
Developer reference
Maybe you are looking for
-
How to connect my 2008 MacBook to a HD TV?
How? P.S. I'm planning on watching some PAL DVD's this way.
-
Photoshop CS6 has out of memory errors under Mac OS X 10.7.4
Has anyone who has a 2008 MacBoo Pro with the NVIDIA GeForce 8600M GT 512 MB graphics card tried running Photoshop CS6 under Mac OS X 10.7.4? On my MacBook Pro, PS CS6 launches; however, any action results in an out of memory error. The CS6 versions
-
i have several duplicated movie clips, and want to have 2 buttons that swap the depth of these so that the user can page through (like pages of a book). the first part of the code generates the movie clips and puts them on different depths (this all
-
PulseAudio error: Failed to find original dlopen loader
Every time I start PulseAudio, it displays this error: [hb@hb-laptop ~]$ pulseaudio -D W: ltdl-bind-now.c: Failed to find original dlopen loader. [hb@hb-laptop ~]$ The daemon starts though, and PulseAudio works, but I'm wondering what is causing this
-
Photoshop Elements 10 from Mac App Store switched to German
I purchased PS Elements 10 from the Mac App store a month a ago and it's been fine. All of a sudden it switched to German. The only language I have installed in Apple preferences is English. What to do? Thanks.