Jump to content

[SOLVED] form submission response


Lambneck

Recommended Posts

Hello,

 

How can I make it so once a user submits a form

a message comes up saying something like "thank you, your form was submitted"?

 

$_SESSION['form_id'] = 1;  

  while (list($key, $value) = each($_POST))
    $_SESSION[$key] = addslashes($value);

  $submission_id = process_form($_SESSION, $_FILES); 

Link to comment
https://forums.phpfreaks.com/topic/102969-solved-form-submission-response/
Share on other sites

A simple form with as well a simple php script:

 

<?php
if(isset($_POST['name'])){ //check if the post has been submitted
    $name = $_POST['name'];
    echo 'Thank You ' . $name . "! Your form was was submitted';
}
?>
<form id="myForm" name="myForm" method="post" action="mypage.php">
  <input type="text" name="name" />
  <input type="submit" name="Submit" value="Submit" />
</form>

A simple form with as well a simple php script:

 

<?php
if(isset($_POST['name'])){ //check if the post has been submitted
    $name = $_POST['name'];
    echo 'Thank You ' . $name . "! Your form was was submitted';
}
?>
<form id="myForm" name="myForm" method="post" action="mypage.php">
  <input type="text" name="name" />
  <input type="submit" name="Submit" value="Submit" />
</form>

 

should be

 

<?php
if(isset($_POST['name'])){ //check if the post has been submitted
    $name = $_POST['name'];
    echo 'Thank You ' . $name . "! Your form was was submitted";
}
?>
<form id="myForm" name="myForm" method="post" action="mypage.php">
  <input type="text" name="name" />
  <input type="submit" name="Submit" value="Submit" />
</form>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.