|
| [WB] Passing Parameters (variables) - PHP to WL |
| Iniciado por guest, 26,oct. 2015 11:33 - 6 respuestas |
| |
| | | |
|
| |
| Publicado el 26,octubre 2015 - 11:33 |
Hi Guys,
I am probably doing something wrong but help is required.
Scenario -
My page is called from other website with $_POST used as way of passing variables. 1. I have an edit_control on the page. 2. I have made proc_php () - called from page initialisation 3. proc_php is a PHP local procedure and I can read the variables using "echo $_POST[ xxx ] 4. I want to get [ xxx ] value moved to edit_control.
All help greatly appreciated.
TIA.
Mike |
| |
| |
| | | |
|
| | |
| |
| Publicado el 26,octubre 2015 - 14:11 |
Hi Mike,
I think you should simply be able to use PageParameter() with the name of the argument you wish. There is a paramBuffer type that can be used to get the POST data if this is required.
Best regards, Alexandre Leclerc |
| |
| |
| | | |
|
| | |
| |
| Publicado el 26,octubre 2015 - 16:42 |
Alexandre,
Thanks for the reply -
Do you by any chance have an example? Unfortunately, the help isn't as good as it could be.
Mike |
| |
| |
| | | |
|
| | |
| |
| Publicado el 26,octubre 2015 - 19:58 |
Hi Mike,
Here are two examples:
gbuf is Buffer = PageParameter(paramBuffer) // Get RAW data sent by POSTing
gs is string = PageParameter("abc") // Get specific data received from url parameter (and I think also by POST, but I might be wrong here - it makes too long time I did not work with WebDev)
Best regards, Alexandre Leclerc |
| |
| |
| | | |
|
| | |
| |
| Publicado el 26,octubre 2015 - 22:11 |
Hi,
This is how I get the raw URL parameter string from the web request: PrnReq:URLRawParameterString = URLDecode(Replace(SysEnvironnement("QUERY_STRING"),"QUERY_STRING=","",SansCasse)) Next I break it up into an associative array (PrmLst is associative array (ccIgnoreAccent+ccIgnoreCase) of string): //Parse Raw Param into associative array FOR EACH STRING param OF :URLRawParameterString SEPARATED BY "&" PrmLst[ExtractString(param,1,"=",DepuisDébut)]=ExtractString(param,2,"=",DepuisDébut) END The associative array gives you extremely easy referencing on any parameter throughout your program.
Cheers,
Peter Holemans |
| |
| |
| | | |
|
| | |
| |
| Publicado el 27,octubre 2015 - 15:13 |
Thanks Guys,
I will give it a go later.
Regards,
Mike |
| |
| |
| | | |
|
| | |
| |
| Publicado el 27,octubre 2015 - 17:03 |
Thanks Guys,
ALL WORKING WELL ....
I am able to get the $_POST completely as RAW data.
Put this into the page initialisation -
gbuf is Buffer = PageParameter(paramBuffer) // Get RAW data sent by $_POST
gs is string = PageParameter("transId")
Static1 = gbuf Static2 = gs
Displays data correctly.
Many, Many Thanks!!!!
Mike |
| |
| |
| | | |
|
| | | | |
| | |
|