I want to send query in Html form 'action' to get data from other site.
let suppose my url is http://abc.xyz/index.jsp?number=<?php echo $number;?>
Problem is i can't execute php script in form action.When i press submit it just go to http://abc.xyz/index.jsp?number= without php output value.Is it possible that way?

Please help me.
Here is my code

<?php
error_reporting(E_ALL ^ E_NOTICE);
if (isset($_POST['submit']))
{
    $number     =   $_POST['number'];

}
?>
<form id="form1" name="form1" method="post" action="http://abc.xyz/index.jsp?number=<?php echo $number;?>">
  <table width="322" height="225" border="1" align="center">

    <tr>
      <td height="80">Enter  Number</td>
      <td><input type="text" name="number" id="number" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" id="submit" value="Submit" /></td>
    </tr>    
  </table>
Member Avatar for diafol

THis looks as though your top code is expecting this form data but it won't receive it as your form is sending the post data to the remote site. You may want to change your code to this to see if it works:

<form id="form1" name="form1" method="get" action="http://abc.xyz/index.jsp">
  <table width="322" height="225" border="1" align="center">
    <tr>
      <td height="80">Enter  Number</td>
      <td><input type="text" name="number" id="number" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" id="submit" value="Submit" /></td>
    </tr>    
  </table>
</form>

This will probably send the submit parameter as well but I don't think that should matter too much. However, you now get sent to the remote site. Is that what you want? cURL may be used though. Failing that "x-site ajax" using JSONP (see jQuery).
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.