I am using a soap element in my code, and now I am facing a problem.
I want to add a PHP variable in the soap element:
<HotelRef HotelCode="00001659"/>
Here instead of 00001659, I have to use dynamic PHP variable like below:
$hotel_id
I have tried directly by putting the variable in place of HotelCode, but it is not working.
How can I do this? Please help me.
Thanks in advance
<HotelRef HotelCode="<?php echo $hotel_id ?>"/>
Related
I need one help. I need to pass some parameter to another php file and display it using PHP. I am explaining my code below.
user.php:
<?php
$product_id=$_POST['product_id'];
?>
I need to pass this parameter ($product_id) to the following file by calling it.
saveUser.php:
<?php
$newCustomerobj->product_id =$_REQUEST['product_id'];
print_r($newCustomerobj);
?>
Here i need to pass the value from user.php to saveUser.php.Please help me.
If it need not be secure, then pass it as a query string like saveUser.php?id=product_id and access it using $_GET['id'].
If you write a function as following
public function functionName($product_id, $variable 2,...)
{
require_once ('saveUser.php');
}
Then usually all variable will get in saveUser.php file. I don't know if it can help you.
I want to integrate a webviewer component in an appinventor app.
I want the app to POST something to already prepared PHP script. I do not want to use GET. So PHP on server looks like:
<?php echo $_POST['value']; ?>
My appinventor block looks like:
This is NOT working. Any help appreciated.
Thanks.
EDIT: 2nd try. Thank you #YiWei.
add requestheaders:content-type:application/x-www-form-urlencoded and buildrequestData
the webviewer only can do GET
this should work:
using the web component, you get the result back in the Web.GotText event
see also the documentation
I am trying to use decodeURIComponent in a JS function inside Facebook instead of using urldecode in PHP. But I keep getting the following error :
Error: a194182563946198_decodeURIComponent is not defined
Can anyone kindly help ?
Thanks.
-
Ahsan
On a second thought, I am using a PHP intermediate file that does the work on ajax call. :)
-
ahsan
Suppose i need to invoke a function (php) from inside a js function using AJAX, is the
following syntax correct:
$.post("phpReceivingFile.php", {func: (name: "james")}
....
....
No, it won't work, you can't invoke specific php functions like that. I suggest sending a get parameter and inside your php do something like:
if($_GET['func'] == 'yourfunction') yourfunction($_GET['name']);
You might want to have a look at this short php/ajax tutorial to see how you get the variables sent to a php script.
I'm using selenium-rc with php. I want to show in my test the value of CLASSNAME. How can i present the var? I tried to do $this['drivers']['CLASSNAME'] but this is not working for me.
(This is from the debug)
Thank you!
Looks like it should be:
$this->drivers[0]->CLASSNAME