Ok, I am trying to pass a variable to an external page that is being framed with nukewrapper. I figure to have it load the page with the variable its going to have be setup in the array so that I call it like this:
page.php?URL=quickquote
which is a shortcut to:
http://absreport.aghost.net/index.cfm?show=203"e=
Standalone, if I wanted to load the page with a quote for CSCO, i would just add CSCO to the end of the URL, like this:
http://absreport.aghost.net/index.cfm?show=203"e=CSCO
So i figured I should be be able to use a form and POST that variable to the end like this:
page.php?URL=quickquote"e=csco. But that doesnt now work and loads no variable. So i tried this:
'quickquote' => 'http://absreport.aghost.net/index.cfm?show=203"e=$_POST[\'quote\']',
No luck there either. As it will try to load $_POST[\'quote\' instead of CSCO
Any ideas? Thanks.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Nukewrapper, POST, external page
-
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
-
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
In HTML forms using the POST method, you cannot have query strings in the form Action, as you point out it simply gets dropped. You can instead place the variables in a Hidden field.
As for placing it in a key, in PHP varables are only parsed in double-quoted strings, and then you'd leave out the single quotes in $_POST['varname']. Anything in single quotes are taken literally, as you found out.
The solution: Either use double-quotes for the URL part, or exit the single quotes first:
Code
(quickquote' => "http://absreport.aghost.net/index.cfm?show=203"e=$_POST[quote]");
or
(quickquote' => 'http://absreport.aghost.net/index.cfm?show=203"e='.$_POST['quote']);
The "." character after the end single quote appends the POST variable.
Either way should work.
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
