Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Sep 2012
    Posts
    64
    Member #
    32790
    Liked
    3 times
    Is it possible to show the thank you message only instead of having it pop up above the form?? I would like to have the message only and not show the form underneath it.

  2.  

  3. #2
    Senior Member Ganners's Avatar
    Join Date
    Feb 2011
    Location
    United Kingdom
    Posts
    415
    Member #
    27007
    Liked
    92 times
    Need to see some code for this first
    Mark Gannaway Software Developer

    Recent Experiments
    - Backpropogation Neural Network language solving (http://ann.ganners.co.uk/)
    - Animated image to ASCII (http://google.ganners.co.uk/)
    - 3D Paper Characters (http://cybergame.ganners.co.uk/)
    - Anagram solving (http://roflol.co.uk/)

  4. #3
    Member
    Join Date
    Sep 2012
    Posts
    64
    Member #
    32790
    Liked
    3 times
    The code is

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'>
    </head>

    <body>
    <style type="text/css">
    table, th, td, tr, input {
    font-family: 'Lato', sans-serif;
    font-size:13px;
    font-weight:300;
    letter-spacing:0.6px;
    }
    </style>

    <?php

    include_once('config.php');

    if(
    $_POST['submitID'] == 1){

    if(
    $_POST['name'] == NULL){ $message 'Please enter your name.';}
    if(
    $message == NULL && is_valid_email($_POST['email']) == false ){ $message 'Please enter a valid email.';}
    if(
    $_POST['messageText'] == NULL && $message == NULL){ $message 'Please enter a comment.';}

    if(
    $mentalQuestion == TRUE)
    {
    foreach(
    $mentalQuestionList as $question) {if($question[0] == $_POST['question']){$answer $question[1];}}
    if(
    $answer != $_POST['finalAnswer'] || $answer == NULL)
    {
    $message 'Your answer to "'.$_POST['question'].'" is invalid.';
    }
    }

    if(
    $message == NULL){

    $doSearch = array('$+name+$','$+email+$','$+message_text+$','$+reason+$');
    $doReplace = array($_POST['name'],$_POST['email'],$_POST['messageText'],$_POST['reason']);

    $headers "Return-Path: ".$siteTitle." <".$emailFrom.">\r\n";
    $headers .= "From: ".$siteTitle." <".$emailFrom.">\r\n";
    $headers .= "Content-Type: text/html; charset=".$emailCharset.";\n\n\r\n";

    if(
    $sendThankYou == TRUE){
    $userMessage str_replace($doSearch,$doReplace,$emailSubject);
    mail ($_POST['email'],$emailTitle,$userMessage,$headers);
    }
    $adminMessage str_replace($doSearch,$doReplace,$emailSubjectAdmin);

    if(
    count($adminEmails) > 0){
    foreach(
    $adminEmails as $thisEmail){
    mail($thisEmail,$emailAdminTitle,$adminMessage,$headers);
    }
    }

    $message 'Your message has been sent, I will be in touch shortly.';
    $_POST NULL;
    }
    }
    if(
    $message != NULL){
    ?>

    <table width="360" height="20" border="0" cellspacing="0" bgcolor="">
    <tr>
    <font color="#9e005d"><td><?=$message;?></td></font>
    </tr>
    </table>
    <br/>
    <?php ?>
    <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" name="contact" id="contact" style="display:inline;">
    <table width="360" height="240" border="0" align="left" cellspacing="0">
    <tr>
    <td>Name:</td>
    <td><input name="name" type="text" id="name" value="<?php echo $_POST['name'];?>"></td>
    </tr>
    <tr>
    <td>Email:</td>
    <td><input name="email" type="text" id="email" value="<?php echo $_POST['email'];?>"></td>
    </tr>
    <tr>
    <td>Message:</td>
    <td><textarea name="messageText" cols="29" rows="4" id="messageText"><?php echo $_POST['messageText'];?></textarea></td>
    </tr>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div align="center">
    <input type="submit" name="Submit" value="Send Contact">
    <input type="hidden" id="question" name="question" value="<?php echo $question;?>">
    <input name="submitID" type="hidden" id="submitID" value="1">
    </div></td>
    </tr>
    </table></form>

    </body></html>

  5. #4
    Member
    Join Date
    Sep 2012
    Posts
    64
    Member #
    32790
    Liked
    3 times
    Is this not possible then?

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    Try this:

    PHP Code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'>
    </head>

    <body>
    <style type="text/css">
    table, th, td, tr, input {
    font-family: 'Lato', sans-serif;
    font-size:13px;
    font-weight:300;
    letter-spacing:0.6px;
    }
    </style>

    <?php

    include_once('config.php');

    if(
    $_POST['submitID'] == 1){
    $flag=0;

    if(
    $_POST['name'] == NULL){ $message 'Please enter your name.';}
    if(
    $message == NULL && is_valid_email($_POST['email']) == false ){ $message 'Please enter a valid email.';}
    if(
    $_POST['messageText'] == NULL && $message == NULL){ $message 'Please enter a comment.';}

    if(
    $mentalQuestion == TRUE)
    {
    foreach(
    $mentalQuestionList as $question) {if($question[0] == $_POST['question']){$answer $question[1];}}
    if(
    $answer != $_POST['finalAnswer'] || $answer == NULL)
    {
    $message 'Your answer to "'.$_POST['question'].'" is invalid.';
    }
    }

    if(
    $message == NULL){

    $doSearch = array('$+name+$','$+email+$','$+message_text+$','$+reason+$');
    $doReplace = array($_POST['name'],$_POST['email'],$_POST['messageText'],$_POST['reason']);

    $headers "Return-Path: ".$siteTitle." <".$emailFrom.">\r\n";
    $headers .= "From: ".$siteTitle." <".$emailFrom.">\r\n";
    $headers .= "Content-Type: text/html; charset=".$emailCharset.";\n\n\r\n";

    if(
    $sendThankYou == TRUE){
    $userMessage str_replace($doSearch,$doReplace,$emailSubject);
    mail ($_POST['email'],$emailTitle,$userMessage,$headers);
    }
    $adminMessage str_replace($doSearch,$doReplace,$emailSubjectAdmin);

    if(
    count($adminEmails) > 0){
    foreach(
    $adminEmails as $thisEmail){
    mail($thisEmail,$emailAdminTitle,$adminMessage,$headers);
    }
    }

    $message 'Your message has been sent, I will be in touch shortly.';
    $_POST NULL;
    $flag=1;
    }
    }
    if(
    $message != NULL){
    ?>

    <table width="360" height="20" border="0" cellspacing="0" bgcolor="">
    <tr>
    <font color="#9e005d"><td><?=$message;?></td></font>
    </tr>
    </table>
    <br/>
    <?php 
    if(
    $flag==0){
    ?>
    <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" name="contact" id="contact" style="display:inline;">
    <table width="360" height="240" border="0" align="left" cellspacing="0">
    <tr>
    <td>Name:</td>
    <td><input name="name" type="text" id="name" value="<?php echo $_POST['name'];?>"></td>
    </tr>
    <tr>
    <td>Email:</td>
    <td><input name="email" type="text" id="email" value="<?php echo $_POST['email'];?>"></td>
    </tr>
    <tr>
    <td>Message:</td>
    <td><textarea name="messageText" cols="29" rows="4" id="messageText"><?php echo $_POST['messageText'];?></textarea></td>
    </tr>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div align="center">
    <input type="submit" name="Submit" value="Send Contact">
    <input type="hidden" id="question" name="question" value="<?php echo $question;?>">
    <input name="submitID" type="hidden" id="submitID" value="1">
    </div></td>
    </tr>
    </table></form>
    <?php
    }
    ?>
    </body></html>


  7. #6
    Member
    Join Date
    Sep 2012
    Posts
    64
    Member #
    32790
    Liked
    3 times
    ace! Your a star thank you


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:33 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com