Post form does not submit data entered by client-Thanks for your assistance -


here coding have visitors post informations; when visitor clicks on "submit", visitor sees thank page.(works fine)

our problem data entered visitor not recorded on "requests.php" page created.

thank solve , allow collect data on requests.php form , have form saved each time.

    <div class="content">      <form action="requests.php" method="post">       header('location: thank_you.php')      <strong>&iquest;qu&eacute; limusina usted queria comprar?</strong><br>      <textarea name="comments" rows="10" cols="50"></textarea>      <br>      <br>       <p><strong>su informaci&oacute;nes (importante): click sobre           &quot;submit&quot; al fin cuando usted ha terminado:</strong></p>       <br>       <strong>su nombre</strong><br>       <input name="name" value size="50">        <br>        <br>        <strong>pa&iacute;s y ciudad</strong><br>        <input name="country" value size="50">        <br>        <br>        <strong>compan&iacute;a (importante)</strong><br>        <input name="company" value size="50">        <br>        <br>        <strong>tel&eacute;fono</strong><br>        <input name="telephone" value size="50">        <br>        <br>        <strong>e-mail</strong><br>         <input name="email" value size="50">         <br>         <br>         <strong>&iquest;cuando usted quiere comprar su limusina?</strong><br>          <input name="when_need_limo" value size="50">          <br>          <br>          <input name="submit" type="submit" value="submit">            </form>           </div> <!-- end main div --> 

based on can see, problem php code:

<?php $name = $_post["name"]; $country = $_post["country"]; $company = $_post["company"]; $telephone = $_post["telephone"]; $email = $_post["email"]; $when_need_limo = $_post["when_need_limo"]; echo $name;  ?> 

$name pointing field have name attribute = "name". however, in html, name "name". thus, make php code reflect name in html, need change to:

$name = $_post["name"]

then, when echo $name, should show whatever entered in field.

additionally, header('location: thank_you.php') designed redirect user page called "thank_you.php." have in html, meaning never run php.

if want code executed, need wrap in php tags, so:

<?php header('location: thank_you.php') ?> 

it need in php file. however, if put in results.php file, browser redirect thank_you.php before showing results.

let me know if helps.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -