Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Contact Form - Novice Needs Help

Featured Replies

Hi All,

 

Any help on this would be SO appreciated. Although I've been doing HTML for quite awhile, I'm still trying to wrap my head around CSS and PHP.

 

I downloaded a free CSS template that includes a Contact form. Below is the CSS code for it:

 

/*------------ Contact form -----------------*/

label {
font-style: italic;
}

form.contact_us {
width: 170px;
}

input.fields_contact_us {
       display: block;
       width: 170px;
       background: url(images/menu_hover.png)!important;
	background: none;
	border-top: 1px solid #C0935C;
	border-left: 1px solid #C0935C;
	border-bottom: 1px solid #D9B17D;
	border-right: 1px solid #D9B17D;
	margin-top: 3px;
   	margin-bottom: 3px;
}

textarea {
         width: 170px;
         background: url(images/menu_hover.png)!important;
  	background: none;
  	border-top: 1px solid #C0935C;
  	border-left: 1px solid #C0935C;
  	border-bottom: 1px solid #D9B17D;
  	border-right: 1px solid #D9B17D;
  	display: block;
         margin-top: 3px;
}

.submit_button_contact {
margin-top: 15px;
width: 100%;
padding: 2px;
background: none;
cursor: pointer;
color: #926B4A;
border: none;
font-size: 1.8em;
font-weight: bold;
font-family: "Times New Roman", Times, serif;
font-style: italic;
}

 

Then, there is the index.html page code for the form, shown below:

 

<form id="form1" method="post" class="contact_us" action="http://www.free-css.com/">
       <p>
         <label>Name
         <input type="text" class="fields_contact_us" name="textfield" />
         </label>
         <label>E-mail
         <input type="text" class="fields_contact_us" name="textfield1" />
         </label>
         <label> Message:
         <textarea name="textarea" cols="" rows=""></textarea>
         </label>
         <label>
         <input type="submit" class="submit_button_contact" name="Submit1" value="Submit" />
         </label>

I thought it would be a simple matter to have the contact form send the info to my email address, just like in the old HTML days. But the more I read, the more my head is spinning in circles and I cannot grasp how to tackle this. I actually deleted the code completely and threw in an email link. I know that's a BIG no-no, but it's the only way I could get the site up and running until I figured this out. But I've hit the wall and need help!

 

1. WHERE am I putting my email address so the form submission comes to me?

2. Do I change the index.html page to index.php?

3. WHAT is this .htaccess I've seen mentioned occasionally and is that necessary to make this work?

4. WHAT directory do I upload them to? Parent? Specific folder?

 

The server does allow PHP use and has a tool for CGI email, but I don't know if I need to d/l it and don't know what to do with it if I did.

 

Please forgive my novice status, but if I can just get help in a simple 1-2-3 manner to copy and paste over with easy to understand instructions for a novice, it would help so much!

 

Thanks much for any help you can give on this.

 

If anyone needs to see the actual template to see what needs to be done, please see this link http://www.free-css....e.php#bookmarks

Edited by Sam G
added [code] tags

Welcome to the world of form handling, in answer to your questions, you will need to use a PHP script.

 

1. the PHP script has a mail() function, that goes:

 

mail ($your_email, $subject, $message, $headers)

 

more information here

 

2. Your form has an action, if you are sending the information to another page to be processed, only that processing page needs to be a .php extension. However, you can also embed the form in the page and leave the action blank, or call it '#', in which case you will need to tell the server that there is PHP on the page by re-naming index.html to index.php

 

3. I don't think .htaccess would have any impact on what your trying to do, but maybe someone could correct me.

 

4. not sure what you mean here, the form will email it's data to you.

 

Jem on this forum is a bit of a pro, and she has a free contact form script here

 

 

good luck, it took me a little while to get the hang of forms.

  • 3 weeks later...
  • Author

Sorry for such a delay in thanking all of you for your kind help. I got busy on other items and had to put this project on the back burner.

 

I'm sad to say that I still don't understand what I'm doing or where to put the codes. I was going to use a form generator, but I do like the one that comes with the template, as it matches the background and was made to match the whole theme. I don't know why I can't wrap my head around this, but each time I read one or two instructions my brain starts to short circuit and I get frustrated.

 

I think I'll have to take a class in CSS & PHP.

 

Thanks to you all for your generosity and time ... and Happy Holidays to you all!

You can also Google for a site called PHPFormGen that'll work for you. If you use Wordpress you can use a plugin called ContactForm2

PHP Contact form with captcha! I was writing another anyway, so thought why not build you one and it even includes a captcha form! ohh and it gets the users IP address :) You ow me! :p

 

Ive also attached a file called "recaptchalib.php" which contains settings for the captcha form, dont touch it just include it in the same DIR as the contact form.

 

THE PHP (INCLUDE ON SAME PAGE AS THE FORM)

<?php

//////////////////////////////////////
// FUNCTION SHOW CAPTCHA FORM
//////////////////////////////////////
function showcaptcha() {
require_once('recaptchalib.php');
$publickey = "6LcllwkAAAAAAIpCG6LzOmqZYgtUfgVwzMqXuzKC"; //PRIVATE KEY, REPLACE THIS KEY FROM RECAPTCHA.NET!
echo recaptcha_get_html($publickey);
}

//////////////////////////////////////
// DATA REQUESTING TAKEOFF
//////////////////////////////////////
if (isset($_GET['action']) == "check") {


//////////////////////////////////////
// CLEARENCE CHECK, ARE WE HUMAN?
//////////////////////////////////////
require_once('recaptchalib.php');
$privatekey = "6LcllwkAAAAAAJtYF5dqlb4YT6sBhRZcXUz-krKL"; //PRIVATE KEY, REPLACE THIS KEY FROM RECAPTCHA.NET!
$resp = recaptcha_check_answer ($privatekey,
                               $_SERVER["REMOTE_ADDR"],
                               $_POST["recaptcha_challenge_field"],
                               $_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
//////////////////////////////////////
// NO? LETS KILLS THEM!
//////////////////////////////////////
die("Sorry, you entered an incorrect security code<br /> <a href=\"javascript:history.go(-1)\"  onmouseover=\"self.status=document.referrer;return true\"><u>Please click here to try again!</u></a>");
}

//////////////////////////////////////
// SO WE ARE HUMAN! LETS GET THE DATA!
//////////////////////////////////////
$name = $_POST['name'];
$username = $_POST['username'];
$subject = $_POST['subject'];
$email = $_POST['email'];
$message = $_POST['message'];
$ip = $_POST['ip'];
$companyemail = "support@gobbydog.com";
$date = date('l jS \of F Y h:i:s A');
$from = "from: service@YOURWEBSITENAME.COM";

//////////////////////////////////////
// MAKE THE EMAIL
//////////////////////////////////////
$fullmessage = "You are recieving this message because $name has contacted you using the YOURWEBSITE NAME contact form.

Client Name: $name
Client Username: $username
Client IP:  $ip

Date & Time: $date
Message Subject: $subject

Client Message: 
$message

Kind Regards
The mail man!";

//////////////////////////////////////
// WE HAVE THE DATA, NOW MAIL IT!
//////////////////////////////////////
mail($companyemail,$subject,$fullmessage,$from);

//////////////////////////////////////
// TELL THEM ITS OK!
//////////////////////////////////////
echo("Thank you, We look forword to recieving your email soon.");
}
?>

 

JAVASCRIPT ERROR THIS CHECKS THE FORM FOR ERRORS, INCLUDE THIS IN YOUR HEADER ON THE SAME PAGE AS THE CONTACT FORM...

<script language="JavaScript" type="text/javascript">
<!--
function checkform ( form )
{
 if (form.name.value == "") {
   alert( "Please enter your name." );
   form.email.focus();
   return false ;
 }
 if (form.message.value == "") {
   alert( "Please enter your message." );
   form.email.focus();
   return false ;
 }
 if (form.email.value == "") {
   alert( "Please enter your email address you@you.com." );
   form.email.focus();
   return false ;
 }
 // ** END **
 return true ;
}
//-->
var RecaptchaOptions = {
  theme : 'blackglass'
};
</script>

 

 

 

THE CONTACT FORM MUST BE INCLUDED ON THE SAME PAGE AS THE PHP


<form name="contact" action="?action=check" method="post" onsubmit="return checkform(this);">
<table>  
<tr>
 <td>
 Please fill out the form below, and a member of our team will get back to you as soon as possible.<br />
 </td>
 </tr>
 <tr class="ft_style">
   <td >
   Name:<br /><p>Please enter your full name here.</p>
<input class="contactformfield" name="name" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Subject:<br />
<select class="contactformfield" name="subject">
 <option value="Billing Support">Billing Support</option>
 <option value="Report Bug">Report Bug</option>
 <option value="Other">Other</option>
 <option value="Sales Support">Sales Support</option>

</select></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Username(If any):<br /><p>If you have an account with us enter your username here.</p>
<input class="contactformfield" name="username" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Your Email:<br /><p>Please enter your email address here.</p>
<input class="contactformfield" name="email" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Comments:<br /><p>Please enter your message here.</p>
<textarea class="contactformfield" name="message" cols="30" rows="5"></textarea><br /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr>
 <td>
 Please enter the security code below. 
 <br />
 <?php echo showcaptcha(); ?></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr>
   <td>
 <br /><input class="contactformfield" name="ip" type="hidden" value="<?php echo($_SERVER['REMOTE_ADDR']); ?>"/>
<input name="submit" type="submit" value="Submit" />

</td>
 </tr>
</table>
</form>

 

 

PS, Dont say i never do anything for you, its 03:08AM here, and i should be asleep ;)

 

 

EDIT: Fixed a few bugs, all working now :)

Kind Regards

Shaun

Ok well theres somethings wrong with this form first off no email validation sec if they dont have javascript enabled u need to have where php validates the info also, the way u have it now i would not recommend ur form to anyone

Ok well theres somethings wrong with this form first off no email validation sec no header injection validation and 3rd if they dont have javascript installed u need to have where php validates the info also, the way u have it now i would not recommend ur form to anyone

 

Ok mate, no hard feelings :), Im still learning PHP, if you want to correct me in the current form, i can learn from my mistakes :) thanks for spotting the issues though..

Ok mate, no hard feelings :), Im still learning PHP, if you want to correct me in the current form, i can learn from my mistakes :) thanks for spotting the issues though..

No prob bro and i was not criticizing u by no means i hope u know :) btw u did do really good on the rest of the form though :clapping::mf_rudolph:

No prob bro and i was not criticizing u by no means i hope u know :) btw u did do really good on the rest of the form though :clapping::mf_rudolph:

 

Thank you! :p Ive just googled header injection, and that made me panic a bit as i have intergrated that form on existing websites, i didnt know that was a security exploit at all, im gonna start learning php again starting today..

 

Do you have msn? be nice if i have someone to talk to with skills with php... if so pm me :)

 

 

Thanks

Shaun

Ok so i fixed some security issues in shauns form but i give him full credit for building it hope you enjoy form should work have not tested it yet but if it dont please let me know cheers :)

 

 

 

 

THE PHP (INCLUDE ON SAME PAGE AS THE FORM)

 

<?php

//////////////////////////////////////
// FUNCTION SHOW CAPTCHA FORM
//////////////////////////////////////
function showcaptcha() {
require_once('recaptchalib.php');
$publickey = "6LcllwkAAAAAAIpCG6LzOmqZYgtUfgVwzMqXuzKC"; //PRIVATE KEY, REPLACE THIS KEY FROM RECAPTCHA.NET!
echo recaptcha_get_html($publickey);
}

//////////////////////////////////////
// DATA REQUESTING TAKEOFF
//////////////////////////////////////
if (isset($_GET['action']) == "check") {


//////////////////////////////////////
// CLEARENCE CHECK, ARE WE HUMAN?
//////////////////////////////////////
require_once('recaptchalib.php');
$privatekey = "6LcllwkAAAAAAJtYF5dqlb4YT6sBhRZcXUz-krKL"; //PRIVATE KEY, REPLACE THIS KEY FROM RECAPTCHA.NET!
$resp = recaptcha_check_answer ($privatekey,
                               $_SERVER["REMOTE_ADDR"],
                               $_POST["recaptcha_challenge_field"],
                               $_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
//////////////////////////////////////
// NO? LETS KILLS THEM!
//////////////////////////////////////
die("Sorry, you entered an incorrect security code<br /> <a href=\"javascript:history.go(-1)\"  onmouseover=\"self.status=document.referrer;return true\"><u>Please click here to try again!</u></a>");
}

//////////////////////////////////////
// SO WE ARE HUMAN! LETS GET THE DATA!
//////////////////////////////////////
$name = $_POST['name'];
$username = $_POST['username'];
$subject = $_POST['subject'];
$email = $_POST['email'];
$message = $_POST['message'];
$ip = $_POST['ip'];
$companyemail = "support@gobbydog.com";
$date = date('l jS \of F Y h:i:s A');
$from = "from: service@YOURWEBSITENAME.COM";

$check_mail = "/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";

/*
Error holder

*/

$errors = array();



////////////////////////////////
//START PHP ERROR CHECKING
///////////////////////////////
if(!$name){
$errors[] = "Please enter your name!";

}
if(!$username){
$errors[] = "Please enter a username!";

}
if(!$email){
$errors[] = "Please enter your email!";

}
if($email){
if(!preg_match($check_mail,$email)){
$errors[] = "Please enter a valid email address!";
}

}
if(!$message){
$errors[] = "Please enter your message!";

}

if(count($errors) > 0){
foreach($errors AS $error){

echo "$error <br />";
}

}else{
//////////////////////////////////////
// MAKE THE EMAIL
//////////////////////////////////////
$fullmessage = "You are recieving this message because $name has contacted you using the YOURWEBSITE NAME contact form.

Client Name: $name
Client Username: $username
Client IP:  $ip

Date & Time: $date
Message Subject: $subject

Client Message: 
$message

Kind Regards
The mail man!";

//////////////////////////////////////
// WE HAVE THE DATA, NOW MAIL IT!
//////////////////////////////////////
mail($companyemail,$subject,$fullmessage,$from);

//////////////////////////////////////
// TELL THEM ITS OK!
//////////////////////////////////////
echo("Thank you, We look forword to recieving your email soon.");
}
}


?>

 

JAVASCRIPT ERROR THIS CHECKS THE FORM FOR ERRORS, INCLUDE THIS IN YOUR HEADER ON THE SAME PAGE AS THE CONTACT FORM...

<script language="JavaScript" type="text/javascript">
<!--
function checkform ( form )
{
 if (form.name.value == "") {
   alert( "Please enter your name." );
   form.email.focus();
   return false ;
 }
 if (form.message.value == "") {
   alert( "Please enter your message." );
   form.email.focus();
   return false ;
 }
 if (form.email.value == "") {
   alert( "Please enter your email address you@you.com." );
   form.email.focus();
   return false ;
 }
 // ** END **
 return true ;
}
//-->
var RecaptchaOptions = {
  theme : 'blackglass'
};
</script>

 

 

 

THE CONTACT FORM MUST BE INCLUDED ON THE SAME PAGE AS THE PHP


<form name="contact" action="?action=check" method="post" onsubmit="return checkform(this);">
<table>  
<tr>
 <td>
 Please fill out the form below, and a member of our team will get back to you as soon as possible.<br />
 </td>
 </tr>
 <tr class="ft_style">
   <td >
   Name:<br /><p>Please enter your full name here.</p>
<input class="contactformfield" name="name" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Subject:<br />
<select class="contactformfield" name="subject">
 <option value="Billing Support">Billing Support</option>
 <option value="Report Bug">Report Bug</option>
 <option value="Other">Other</option>
 <option value="Sales Support">Sales Support</option>

</select></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Username(If any):<br /><p>If you have an account with us enter your username here.</p>
<input class="contactformfield" name="username" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Your Email:<br /><p>Please enter your email address here.</p>
<input class="contactformfield" name="email" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Comments:<br /><p>Please enter your message here.</p>
<textarea class="contactformfield" name="message" cols="30" rows="5"></textarea><br /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr>
 <td>
 Please enter the security code below. 
 <br />
 <?php echo showcaptcha(); ?></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr>
   <td>
 <br /><input class="contactformfield" name="ip" type="hidden" value="<?php echo($_SERVER['REMOTE_ADDR']); ?>"/>
<input name="submit" type="submit" value="Submit" />

</td>
 </tr>
</table>
</form>

Ok so i fixed some security issues in shauns form but i give him full credit for building it hope you enjoy form should work have not tested it yet but if it dont please let me know cheers :)

 

 

 

 

THE PHP (INCLUDE ON SAME PAGE AS THE FORM)

 

<?php

//////////////////////////////////////
// FUNCTION SHOW CAPTCHA FORM
//////////////////////////////////////
function showcaptcha() {
require_once('recaptchalib.php');
$publickey = "6LcllwkAAAAAAIpCG6LzOmqZYgtUfgVwzMqXuzKC"; //PRIVATE KEY, REPLACE THIS KEY FROM RECAPTCHA.NET!
echo recaptcha_get_html($publickey);
}

//////////////////////////////////////
// DATA REQUESTING TAKEOFF
//////////////////////////////////////
if (isset($_GET['action']) == "check") {


//////////////////////////////////////
// CLEARENCE CHECK, ARE WE HUMAN?
//////////////////////////////////////
require_once('recaptchalib.php');
$privatekey = "6LcllwkAAAAAAJtYF5dqlb4YT6sBhRZcXUz-krKL"; //PRIVATE KEY, REPLACE THIS KEY FROM RECAPTCHA.NET!
$resp = recaptcha_check_answer ($privatekey,
                               $_SERVER["REMOTE_ADDR"],
                               $_POST["recaptcha_challenge_field"],
                               $_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
//////////////////////////////////////
// NO? LETS KILLS THEM!
//////////////////////////////////////
die("Sorry, you entered an incorrect security code<br /> <a href=\"javascript:history.go(-1)\"  onmouseover=\"self.status=document.referrer;return true\"><u>Please click here to try again!</u></a>");
}

//////////////////////////////////////
// SO WE ARE HUMAN! LETS GET THE DATA!
//////////////////////////////////////
$name = $_POST['name'];
$username = $_POST['username'];
$subject = $_POST['subject'];
$email = $_POST['email'];
$message = $_POST['message'];
$ip = $_POST['ip'];
$companyemail = "support@gobbydog.com";
$date = date('l jS \of F Y h:i:s A');
$from = "from: service@YOURWEBSITENAME.COM";

$check_mail = "/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";

/*
Error holder

*/

$errors = array();



////////////////////////////////
//START PHP ERROR CHECKING
///////////////////////////////
if(!$name){
$errors[] = "Please enter your name!";

}
if(!$username){
$errors[] = "Please enter a username!";

}
if(!$email){
$errors[] = "Please enter your email!";

}
if($email){
if(!preg_match($check_mail,$email)){
$errors[] = "Please enter a valid email address!";
}

}
if(!$message){
$errors[] = "Please enter your message!";

}

if(count($errors) > 0){
foreach($errors AS $error){

echo "$error <br />";
}

}else{
//////////////////////////////////////
// MAKE THE EMAIL
//////////////////////////////////////
$fullmessage = "You are recieving this message because $name has contacted you using the YOURWEBSITE NAME contact form.

Client Name: $name
Client Username: $username
Client IP:  $ip

Date & Time: $date
Message Subject: $subject

Client Message: 
$message

Kind Regards
The mail man!";

//////////////////////////////////////
// WE HAVE THE DATA, NOW MAIL IT!
//////////////////////////////////////
mail($companyemail,$subject,$fullmessage,$from);

//////////////////////////////////////
// TELL THEM ITS OK!
//////////////////////////////////////
echo("Thank you, We look forword to recieving your email soon.");
}
}


?>

 

JAVASCRIPT ERROR THIS CHECKS THE FORM FOR ERRORS, INCLUDE THIS IN YOUR HEADER ON THE SAME PAGE AS THE CONTACT FORM...

<script language="JavaScript" type="text/javascript">
<!--
function checkform ( form )
{
 if (form.name.value == "") {
   alert( "Please enter your name." );
   form.email.focus();
   return false ;
 }
 if (form.message.value == "") {
   alert( "Please enter your message." );
   form.email.focus();
   return false ;
 }
 if (form.email.value == "") {
   alert( "Please enter your email address you@you.com." );
   form.email.focus();
   return false ;
 }
 // ** END **
 return true ;
}
//-->
var RecaptchaOptions = {
  theme : 'blackglass'
};
</script>

 

 

 

THE CONTACT FORM MUST BE INCLUDED ON THE SAME PAGE AS THE PHP


<form name="contact" action="?action=check" method="post" onsubmit="return checkform(this);">
<table>  
<tr>
 <td>
 Please fill out the form below, and a member of our team will get back to you as soon as possible.<br />
 </td>
 </tr>
 <tr class="ft_style">
   <td >
   Name:<br /><p>Please enter your full name here.</p>
<input class="contactformfield" name="name" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Subject:<br />
<select class="contactformfield" name="subject">
 <option value="Billing Support">Billing Support</option>
 <option value="Report Bug">Report Bug</option>
 <option value="Other">Other</option>
 <option value="Sales Support">Sales Support</option>

</select></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Username(If any):<br /><p>If you have an account with us enter your username here.</p>
<input class="contactformfield" name="username" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Your Email:<br /><p>Please enter your email address here.</p>
<input class="contactformfield" name="email" value="" type="text" /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr class="ft_style">
   <td>Comments:<br /><p>Please enter your message here.</p>
<textarea class="contactformfield" name="message" cols="30" rows="5"></textarea><br /><br /></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr>
 <td>
 Please enter the security code below. 
 <br />
 <?php echo showcaptcha(); ?></td>
 </tr>
 <tr>
   <td>
   <br />
 </td>
 </tr>
 <tr>
   <td>
 <br /><input class="contactformfield" name="ip" type="hidden" value="<?php echo($_SERVER['REMOTE_ADDR']); ?>"/>
<input name="submit" type="submit" value="Submit" />

</td>
 </tr>
</table>
</form>

 

 

Thank you, that was kind :) full credit to both of us :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.