I have 2 pages "index.php" and "HomePage.php" :
when i click to sumbit from "index.php" i can't find data post in "Home.php" there is the code of "index.php"
- http://jsfiddle.net/wassim/Wu8Lj/1/
- http://jsfiddle.net/phillpafford/Wu8Lj/2/ &l开发者_StackOverflowt;-- fixed code
the code of "HomePage.php" is
<?php
$place=$_POST["searchBox"];
if (isset($place)){
$p=$place;
}
else {
$p='NO DATA';
}
?>
<div data-role="page" id ="acceuil" >
<div data-role="header" data-theme="a" ><h3>Find<?php echo $p; ?></h3></div>
<div data-role="content">
<?php
echo $p;
?>
</div>
<div data-role="footer" ><h3>footer</h3></div>
You should provide a name
to the input field in order to post it which is missing in your markup. Add the name and then you should be good.
<input type="search" id="searchBox" name="searchBox" placeholder="(Code postale, Ville, Département ...)">
精彩评论