Jump to content

dst_u

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dst_u's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Finally got a solution (using JavaScript): <?php function prepare_post($param1, $param2, $param3, $param4) { ... return $post_string; } // This line should be changed to get the incoming $_POST values $form_elements = prepare_post('1', '2', '3', '4'); $inputs = ''; foreach ($form_elements as $key => $value) { $inputs .= '<input type=\'hidden\' name=\'' . $key . '\' value=\'' . $value . '\'>'; } /**/ ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Checkout </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript" language="javascript"> function submitform(){ document.getElementById('myForm').submit(); } </script> </head> <body onload="submitform()"> <form name="myForm" action="http://www.domain.com/page.html" method="post"> <?php echo $inputs ?> </form> <script type="text/javascript" language="javascript"> document.myForm.submit(); </script>
  2. Hi, I tried this code (socket_connect function) and I get the same problem I get with fsockopen and curl_exec. Neither redirects me to that page. My issue is not only to get the "answer" of a POST query, but to actually redirect the visitor of my page to that 3rd party page, while sending that 3rd party server data that I manipulated on my page.
  3. But somepage.php is not on our server. It's a 3rd party server to which we MUST send a POST message, so we can't use a GET method. I know that with GET it would have taken 2 minutes
  4. That looks like a GET request. We need to send a POST and to be redirected to that page. It's not as easy as could be expected.
  5. Thanks, but this is not related. It's a verification made on the receiving server, while we're looking for a procedure to launch a POST query automatically from our server to the remote server.
  6. The whole idea is to use POST, but automatically, without an actual form submit button
  7. Hello, I'm trying to prepare a php page that gets data by post, processes it and should redirect the visitor to another page, to which we also send other data by post. As I can't use a simple HTML Form, I tried the fsockopen, but it only gives me back the result and doesn't GO to that page. I also tried cURL, but as far as I could see, even when using the CURLOPT_FOLLOWLOCATION option, the header received does NOT include a "Location" field and the page is not redirected. How can/should I do this? Thanks a lot. David
  8. Attached, I posted 2 images: ff.jpg is the menu (when I hover the "About US") using FireFox. ie.jpg is the result I get in Internet Explorer. [attachment deleted by admin]
  9. I'm trying (I just tried again), but I get a server disconnect error. If you dowload the php layers menu (http://phplayersmenu.sourceforge.net/) and check the horizontal menu example, you'll see the libs and javascripts called. This is part of the <head>, although not all and not exactly, since this is the only thing I managed to post here: [code] require_once $myDirPath . 'lib/PHPLIB.php'; require_once $myDirPath . 'lib/layersmenu-common.inc.php'; require_once $myDirPath . 'lib/layersmenu.inc.php'; $mid = new LayersMenu(6, 7, 2, 1); $mid->setMenuStructureFile($myDirPath . 'menu-residential.txt'); $mid->setIconsize(16, 16); $mid->parseStructureForMenu('hormenu1'); $mid->newHorizontalMenu('hormenu1'); $mid->printHeader(); [/code]
  10. When I tried to put the full page (include all the php requires), I failed to post the message. This is the full css file (one of 2 used): [code] @charset "iso-8859-1"; .horbar {color: #101C7B;} .horbaritem {font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif; font-size: 12px; color: #101C7B} .horbaritem a {display: block; text-decoration: none; width: 91px} .horbaritem a:link {color: #101C7B; text-decoration: none; font: bold} .horbaritem a:visited {color: #101C7B; text-decoration: none; font: bold} .horbaritem a:hover {color: #4A79D6; text-decoration: none; font: bold} .horbaritem a:active {color: #4A79D6; text-decoration: none; font: bold} .verbar {color: #101C7B; background-color: #FFFFFF; border: 2px outset #cecac1; font: bold} .submenu {position: absolute; left: 0px; top: 0px; visibility: hidden; display: block; border: thin; font: bold} .subframe {position: relative; display: block; background-color: #FFFFFF; border: 2px outset #cecac1; font: bold} .item {font: bold; font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif; font-size: 12px; text-align: left; white-space: nowrap; display: block; border: thin} .item a {display: block; font: bold; position: relative; text-decoration: none; color: #101C7B; border: 1px outset #101c7b; border-bottom: 1px} .item a:link {color: #101C7B; font: bold; text-decoration: none; border: 1px outset #101C7B; display: block; border-bottom: 1px} .item a:visited {color: #101C7B; font: bold; text-decoration: none; border: 1px outset #101C7B; display: block; border-bottom: 1px} .item a:hover {background-color: #ffffff; color: #4A79D6; font: bold; text-decoration: none; border: 1px outset #101C7B; display: block} .item a:active {color: #4A79D6; font: bold; text-decoration: none; border: 1px outset #101C7B; display: block; bottom: ; border-bottom: 1px} /* right: 4px; */ .item .fwdarr {position: relative; top: 5px; right: 7px;} /* top right bottom left */ .separator {background-color: #ff0000;  border-top: 1px solid #9e9a91;  border-bottom: 1px solid ##101C7B;  margin: 2px 0px 2px 1px;    height: 0;  font-size: 1px;  line-height: 0;} [/code] That's the other one used: [code]@charset "windows-1255"; body { margin: 0; padding: 0; } .normal { font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif; font-size: 13px; color: #000000; } .normalbox      { border: 1px solid #440000; margin: 3px; padding: 5px; background-color: #ffffff; } .h1 { text-align: center; font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif; font-size: 22px; font-weight: bold; color: #880000; } .titlebox      { border: 1px solid #440000; margin: 6px; padding: 0px; background-color: #fefaf1; } a:link { text-decoration: none; color: #003300; } a:visited { text-decoration: none; color: #726461; } a:hover { text-decoration: none; color: #841212; } a:active { text-decoration: none; color: #ff0000; } [/code]
  11. Hello, I spent a few hours fighting the horizontal php layers menu. When the page is aligned to the left, it's working perfectly, but if I put inside a table and center it, the sub-menus are not below the header menu. Itis related to the stylesheet, but whatever I tried is not working, and frankly speaking, it's starting to drive me nuts. BTW, it only happens with IE. With Firefox, everything is OK. This is my code (on the main page): [code] <body> <table width="785" border="0" cellpadding="1" cellspacing="2" style="height:198px;" align="center"> <tr>     <td style="position:relative; left:0px; top:0px;" width="548" align="left" valign="top"> <?php $mid->printMenu('hormenu1'); ?> <?php $mid->printFooter(); ?> </td> </tr> </table> </body> [/code] The relevant css is the following: [code].submenu {position: absolute; left: 0px; top: 0px; visibility: hidden; display: block; border: thin; font: bold} [/code] When I change it to relative, I lose the sub-menu. I also played around with the visibility, table/cell alignments... Nothing works. Please help. Thanks  ??? David
  12. Hi Orio, I appreciate the time you dedicate to helping me, but the question has changed in the mean time, thanks to you (since you told me about sessions). I realized that this is not what I need, because a session already exists and the data that I'm looking to use in the "next page" is already there (inside the session). Now, all I need is to "pull" this information out of the session into "local" variables. As you can see in a post I made earlier, this information is not stored as a simple variable in the session, but it's inside an array that is inside another array that is inside an object, so now I need the syntax to use to extract this information out. Also, the session's name is NOT $_SESSION, so this should also be taken into consideration. Thanks, David
  13. This is not something I'm "making". This is data that is already generated by the application that I using. All I need is to extract part of this data and use it in local variables. The question is what is the syntax of a field in an array inside an array inside an array inside an object. Thanks, David
  14. Hello again, This is where I stand after masive exploration: I have a session named '111111', so I can't use $_SESSION. Inside this session, I have many variables, but the one I need is deep inside an Object variable. This is the Object variable's format: [i]navigation|O:17:"navigationhistory":2:{ s:4:"path";a:2:{ i:0;a:4:{ s:4:"page";s:10:"previous.php"; s:4:"mode";s:3:"SSL"; s:3:"get";a:0:{} s:4:"post";a:2:{ [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--] s:11:"ReferenceNo";s:12:"617953126687"; s:8:[!--coloro:#000099--][span style=\"color:#000099\"][!--/coloro--]"AuthCode"[!--colorc--][/span][!--/colorc--];s:6:"0L5326"; [!--colorc--][/span][!--/colorc--] } } i:1;a:4:{ s:4:"page";s:20:"current.php"; s:4:"mode";s:3:"SSL"; s:3:"get";a:0:{} s:4:"post";a:0:{ } } } s:8:"snapshot";a:0:{ } }[/i] This object is built of [b]paths [/b]that include arrays of pages information and a [b]snapshot [/b]that I don't know what it represents, but it's not relevant for me. Inside each path (named i) array there's another array that includes, amongs others the "post" variables the page got. These are the values that I need. So, the question is: How do I exctract the value [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--][b]0L5326[/b][!--colorc--][/span][!--/colorc--] of the variable [!--coloro:#000099--][span style=\"color:#000099\"][!--/coloro--][b]AuthCode[/b][!--colorc--][/span][!--/colorc--] that is inside the array [b]post [/b]that is inside the array [b]path [/b] where i = 1 and [b]path [/b]is inside the [b]navigation [/b]object, where [b]page[/b]'s value is [b]previous.php[/b]? I hope this all makes sense to you and someone could help build the equation. At the end, I would like to have a variable [b]$AuthCode[/b] get the value [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--][b]0L5326[/b][!--colorc--][/span][!--/colorc--]. Thanks, David
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.