<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Thank u Mr.Diego  in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080219#M61293</link>
    <description>&lt;P&gt;Thank u Mr.Diego&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I tried your suggestion and it worked with me :)&lt;/P&gt;

&lt;P&gt;but there is another way( using XMLHttpRequest)&amp;nbsp;to send data to php file by call javascript code in onsubmit event in form tag or by onclick event in button, i need this way because php file will return json format and i need to display these data.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;can u help me about this way &amp;gt;&lt;/P&gt;

&lt;P&gt;Regards&amp;gt;&lt;/P&gt;

&lt;P&gt;Malak&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2016 21:45:00 GMT</pubDate>
    <dc:creator>Malak_A_</dc:creator>
    <dc:date>2016-11-11T21:45:00Z</dc:date>
    <item>
      <title>Post method do not send data to php page</title>
      <link>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080216#M61290</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;TABLE style="margin-top: 0px; margin-bottom: 0px; border: 0px; font-size: 13px; border-collapse: collapse; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;
	&lt;TBODY style="border: 0px;"&gt;
		&lt;TR style="border: 0px;"&gt;
			&lt;TD class="votecell" style="padding: 0px 15px 0px 0px; border-width: 0px; border-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial;"&gt;
				&lt;DIV class="vote" style="margin: 0px; padding: 0px; border: 0px; text-align: center; min-width: 46px;"&gt;&lt;BR /&gt;
					&lt;A class="vote-down-off" style="margin-right: auto; margin-bottom: 10px; margin-left: auto; border: 0px; font-size: 1px; color: rgb(0, 119, 204); cursor: pointer; background-image: url(&amp;quot;img/sprites.svg?v=8c1c8cba242e&amp;quot;), none; background-size: initial; background-repeat: no-repeat; overflow: hidden; display: block; text-indent: -9999em; width: 40px; height: 30px; background-position: 0px -220px;" title="This question does not show any research effort; it is unclear or not useful"&gt;down vote&lt;/A&gt;&lt;A class="star-off" href="http://stackoverflow.com/questions/40476034/post-method-do-not-send-data-to-php-page?noredirect=1#" style="margin-right: auto; margin-bottom: 2px; margin-left: auto; border: 0px; font-size: 1px; color: rgb(0, 119, 204); cursor: pointer; background-image: url(&amp;quot;img/sprites.svg?v=8c1c8cba242e&amp;quot;), none; background-size: initial; background-repeat: no-repeat; overflow: hidden; display: block; text-indent: -9999em; width: 40px; height: 30px; background-position: 0px -120px;" title="Click to mark as favorite question (click again to undo)"&gt;favorite&lt;/A&gt;

					&lt;DIV class="favoritecount" style="margin: 0px; padding: 0px; border: 0px;"&gt;&amp;nbsp;&lt;/DIV&gt;
				&lt;/DIV&gt;
			&lt;/TD&gt;
			&lt;TD class="postcell" style="padding: 0px; border-width: 0px; border-style: initial; border-top-color: initial; border-right-color: initial; border-left-color: initial; border-image: initial;"&gt;
				&lt;DIV style="margin: 0px; padding: 0px; border: 0px;"&gt;
					&lt;DIV class="post-text" itemprop="text" style="margin: 0px 0px 5px; padding: 0px; border: 0px; font-size: 15px; width: 660px; word-wrap: break-word; line-height: 1.3;"&gt;
						&lt;P style="margin-bottom: 1em; border: 0px; clear: both;"&gt;I used post method to send data (username and password ) from xdk app to php file by XMLHttpRequest object,but i faced a problem. all data i sent by post method undefined in php file.I don't know where the error.&lt;/P&gt;

						&lt;P style="margin-bottom: 1em; border: 0px; clear: both;"&gt;this xdk code&lt;/P&gt;

						&lt;PRE class="brush:jscript;"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en-US"&amp;gt;
 
 &amp;lt;head&amp;gt;
  
 &amp;lt;meta charset="UTF-8"&amp;gt;
     
 &amp;lt;link rel="stylesheet" href="css/style.css" media="screen" type="text/css" /&amp;gt;
 
	 &amp;lt;script type="text/javascript"&amp;gt;
		 
		 function createXHR(){
			 if(typeof XMLHttpRequest !="undefined")
				 return new XMLHttpRequest();
			 else
				 return new ActiveXObject("Microsoft.XMLHttp");
			 
		 }
		 function sendRequest(){
			 var pname=document.getElementById("txtName").value;
			  var pGender=document.getElementById("rdoGender").value;
			  var pMail=document.getElementById("txtMail").value;
			  var pCity=document.getElementById("txtCity").value;
			  var pBDate=document.getElementById("txtBDate").value;
			 var str ="txtName="+pname+"&amp;amp;txtgender="+pGender+"&amp;amp;txtemail="+pMail+"&amp;amp;txtcity="+pCity+"&amp;amp;txtdate="+pBDate;
			// alert(str);
			  
			 var oXmlHttp= createXHR();
	oXmlHttp.open("post","http://localhost/hospital/post_data.php","true");
			oXmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			 oXmlHttp.onreadystatechange=Function(){
				 if(oXmlHttp.readyState==4){
					 if(oXmlHttp.status==200 || oXmlHttp.status == 304)
						 divStatus.innerHTML=+ oXmlHttp.responseText;
					 else 
						 divStatus.innerHTML=+ oXmlHttp.statusText; 
				 }//end if
			 }; //end ready state
 	 oXmlHttp.send(str);
			 
		 }
	 &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
 &amp;lt;form  method="post" action="http://localhost/hospital/post_data.php"  onsubmit="sendRequest(); return false;" &amp;gt;
	  
	  &amp;lt;p&amp;gt;enter patient information&amp;lt;/p&amp;gt;
	  
	 &amp;lt;p&amp;gt;NAME
	 &amp;lt;input type="text" id="txtName"  /&amp;gt;
	 &amp;lt;/p&amp;gt;
	  &amp;lt;p&amp;gt;Male
		  
	 &amp;lt;input type="radio" value="M" name="rdoGender"  id="rdoGender"  /&amp;gt;
		  &amp;lt;p&amp;gt;Female
		  
	 &amp;lt;input type="radio" value="F" name="rdoGender" id="rdoGender"/&amp;gt;
	 &amp;lt;/p&amp;gt;
	  &amp;lt;p&amp;gt;EMAIL
	 &amp;lt;input type="email" id="txtMail"/&amp;gt;
	 &amp;lt;/p&amp;gt;
	  &amp;lt;p&amp;gt;city
	 &amp;lt;input type="text" id="txtCity"/&amp;gt;
	 &amp;lt;/p&amp;gt;
	  &amp;lt;p&amp;gt;date
	 &amp;lt;input type="date" id="txtBDate"/&amp;gt;
	 &amp;lt;/p&amp;gt;
	 &amp;lt;input type="submit"     value="save"/&amp;gt;
	 
	 
	  &amp;lt;/form&amp;gt;
  &amp;lt;div id="divStatus"&amp;gt;&amp;lt;/div&amp;gt;
 
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/PRE&gt;

						&lt;P&gt;&amp;nbsp;&lt;/P&gt;

						&lt;P&gt;this is php code&lt;/P&gt;

						&lt;PRE class="brush:php;"&gt;&amp;lt;?php
header("Content_Type: text/plain");

        $link = mysqli_connect("localhost", "root", "", "hospital");

        /* check connection */
        if (mysqli_connect_errno()) {
            echo mysqli_connect_error();
            header("HTTP/1.0 500 Internal Server Error");
            exit();
        }
if(isset($_POST["txtName"]))
{
	$pname=$_POST["txtName"];
	$pgender= $_POST["txtgender"];
	$pemail= $_POST["txtemail"];
	$pdate= $_POST["txtdate"];
	$pcity= $_POST["txtcity"];
}
$insert="insert into 'hospital'.'patient' (`PName`, `Gender`, `email`, `BDate`, `city`) VALUES ($pname,$pgender,$pemail,$pdate,$pcity)";
 
  if ($result = mysqli_query($link, $query)) 
	  echo "Patient data added successfully ";
  else 
	  echo "Patient  data not added successfully ";
    mysqli_close($link);
   
?&amp;gt; &lt;/PRE&gt;

						&lt;P&gt;&amp;nbsp;&lt;/P&gt;
					&lt;/DIV&gt;
				&lt;/DIV&gt;
			&lt;/TD&gt;
		&lt;/TR&gt;
	&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 08 Nov 2016 18:07:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080216#M61290</guid>
      <dc:creator>Malak_A_</dc:creator>
      <dc:date>2016-11-08T18:07:49Z</dc:date>
    </item>
    <item>
      <title>There is no local server that</title>
      <link>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080217#M61291</link>
      <description>&lt;P&gt;There is no local server that will process your php scripts. There is no server in your mobile device. An XDK app is a Cordova (aka PhoneGap) app and is, therefore, strictly a client app. Search for articles that explain "how to post data to a php server in cordova phonegap app" ; for example &amp;gt; &lt;A href="http://stackoverflow.com/questions/22369737/posting-data-from-a-phonegap-app-to-a-server" target="_blank"&gt;http://stackoverflow.com/questions/22369737/posting-data-from-a-phonegap-app-to-a-server&lt;/A&gt; &amp;lt; is such an article.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2016 01:29:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080217#M61291</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-11-09T01:29:42Z</dc:date>
    </item>
    <item>
      <title>Hi Malak,</title>
      <link>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080218#M61292</link>
      <description>&lt;P&gt;Hi Malak,&lt;/P&gt;

&lt;P&gt;There are two things I can say about your code.&lt;/P&gt;

&lt;P&gt;1. Seems to me that you are duplicating the post to the server.&lt;/P&gt;

&lt;P&gt;Just the form action call to php is enough to post the values. There is no need for the code you call on the onsubmit event.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;2. The values are undefined because php uses the name field to identify the post value. Try replacing&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="spaces" style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: rgb(0, 0, 0) !important;"&gt;&amp;lt;input type=&lt;/CODE&gt;&lt;CODE class="string" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: blue !important;"&gt;"text"&lt;/CODE&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: rgb(0, 0, 0) !important;"&gt;id=&lt;/CODE&gt;&lt;CODE class="string" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: blue !important;"&gt;"txtName"&lt;/CODE&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: rgb(0, 0, 0) !important;"&gt;/&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: rgb(0, 0, 0) !important;"&gt;with&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="spaces" style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important;"&gt;&amp;nbsp;&amp;nbsp;&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: rgb(0, 0, 0) !important;"&gt;&amp;lt;input type=&lt;/CODE&gt;&lt;CODE class="string" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: blue !important;"&gt;"text"&lt;/CODE&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;"&gt;&amp;nbsp;name&lt;/SPAN&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: rgb(0, 0, 0) !important;"&gt;=&lt;/CODE&gt;&lt;CODE class="string" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: blue !important;"&gt;"txtName"&lt;/CODE&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: auto !important; color: rgb(0, 0, 0) !important;"&gt;/&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;More info about this here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/5440823/php-form-sending-value-from-an-id-instead-of-value" target="_blank"&gt;http://stackoverflow.com/questions/5440823/php-form-sending-value-from-an-id-instead-of-value&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2016 20:54:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080218#M61292</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-11-09T20:54:15Z</dc:date>
    </item>
    <item>
      <title>Thank u Mr.Diego </title>
      <link>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080219#M61293</link>
      <description>&lt;P&gt;Thank u Mr.Diego&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I tried your suggestion and it worked with me :)&lt;/P&gt;

&lt;P&gt;but there is another way( using XMLHttpRequest)&amp;nbsp;to send data to php file by call javascript code in onsubmit event in form tag or by onclick event in button, i need this way because php file will return json format and i need to display these data.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;can u help me about this way &amp;gt;&lt;/P&gt;

&lt;P&gt;Regards&amp;gt;&lt;/P&gt;

&lt;P&gt;Malak&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 21:45:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080219#M61293</guid>
      <dc:creator>Malak_A_</dc:creator>
      <dc:date>2016-11-11T21:45:00Z</dc:date>
    </item>
    <item>
      <title>Hi Malak,</title>
      <link>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080220#M61294</link>
      <description>&lt;P&gt;Hi Malak,&lt;/P&gt;

&lt;P&gt;You could use jquery ajax to replace your &lt;SPAN style="font-size: 12px;"&gt;XMLHttpRequest code&lt;/SPAN&gt;. Is very simple, &amp;nbsp;take a look to the accepted answer in this post:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/2269307/using-jquery-ajax-to-call-a-php-function" target="_blank"&gt;http://stackoverflow.com/questions/2269307/using-jquery-ajax-to-call-a-php-function&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2016 12:41:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Post-method-do-not-send-data-to-php-page/m-p/1080220#M61294</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-11-12T12:41:23Z</dc:date>
    </item>
  </channel>
</rss>

