Wassim Sboui
Wassim Sboui

Reputation: 1820

JQuery Mobile Form Submit

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"

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>

Upvotes: 0

Views: 1051

Answers (1)

ShankarSangoli
ShankarSangoli

Reputation: 69905

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&eacute;partement ...)">

Upvotes: 1

Related Questions