Jump to content

Form submission verification


Pendragun

Recommended Posts

Can anyone help me with this?

 

I am a graphic designer, not a web programmer, so it is much to my frustration that I have been asked to add some functionality to an existing form structure. I don't know any PHP, and my HTML is amateur at best. Here is the form I currently have (below). I have been asked to add a pop-up message when the submit form button is pressed that says something like "Thank you for your submission".

 

<form action="/PHP/send_form_nobleAcademy_UK_June2010.php" method="post" onSubmit="return SendForm();" name="Contact Centre Essentials" id="Contact Centre Essentials">
						<table align="center" cellpadding="3" cellspacing="1">
                               <!--DWLayoutTable-->
                               <tr>
                                 <td height="58" colspan="2" valign="top" class="style56 style46"><div align="left" class="style1">
                                     To register for the Contact Centre Essentials training course, please complete the details below:
									<br>
                                     <hr align="left" size="1">
                                     Required  Information:</div></td>
                               </tr>
                               <tr>
                                 <td width="132" height="26" valign="top" class="style1">1. Name:</td>
                                 <td width="401" valign="top"><input name="Name" id="Name" size=33></td>
                               </tr>
                               <tr>
                                 <td width="132" height="26" valign="top" class="style1">2. Company:</td>

                                 <td valign="top"><input name="Company" id="Company" size=33></td>
                               </tr>
                               <tr>
                                 <td height="26" valign="top" class="style1">3. No. of attendees</td>
                                 <td valign="top"><input name="Attendees" id="Attendees" size=33></td>
                               </tr>

                                 <td height="21" colspan="2" valign="top"><hr align="left" size="1"></td>
                               </tr>
                               <tr>
                                 <td height="0"></td>
                                 <td></td>
                               </tr>
                             </table>


                             <div align="center"><font face="Century Gothic">
                               <input name="SUBMIT" type="submit" onClick="MM_validateForm('Name','','R','Company','','R','Attendees','','R');return document.MM_returnValue" value="Register Now">
                               <input type="reset" value="Reset Form" name="RESET" >
                             </font></div>


</form>

 

The PHP document this form calls to is here:

 

<?php

$_email = "info-uk@noblesys.com";


$_subject = "Contact Centre Essentials training course registration";


$_destination = "http://www.noblesys.com";


$em_body = "Information submitted from Web Form:\n" .

"------------------------------------\n";

while (list($field, $value) = each($_POST))

$em_body .= $field . ": " . $value . "\n";

$em_body .= "------------------------------------";

$_header  ="From: usingtechnology@noblesys.com";

mail($_email, $_subject, $em_body, $_header);



header("Location: " . $_destination);



?>

 

Thank you in advance for your reply.

Link to comment
Share on other sites

Seems like maybe it would be best to redirect the user to a new page after the form has been submitted, rather than using a popup message. If you look at your PHP code, this line:

 

$_destination = "http://www.noblesys.com";

 

controls where the form redirects to after the form submission has been processed. Rather than using a popup, perhaps just create a new page that includes the thank you message, and change the line within the PHP file:

 

$_destination = "http://www.noblesys.com/name_of_thank_you_file.html";

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...