Contact Us 2.0. with HTML Page and Pop Up Frame - php Form

Author Topic: Contact Us 2.0. with HTML Page and Pop Up Frame  (Read 1500 times)

Offline boyfrom75

  • VIP
  • ****
  • Posts: 21
  • Karma: +5/-0
    • View Profile
Contact Us 2.0. with HTML Page and Pop Up Frame
« on: September 03, 2011, 06:21:39 PM »


This is the same Contact Us 2.0. that is in this forum, But I have added more options to this script and a html page with a very nice  pop Up  frame that DONT get block by any pop Up  software.
Many websites use this type of script to bypass the blocking...

New Options added to the original Contact Us 2.0.

- HTML contact page
- Button to click and open the Contact Us 2.0. form
- Gray Box Frame pop Up
- Address Input to the original Script
- Phone Number Input on original Script ( thanks to " Niko" from this forum to teach me how to do this )

I hope you like it..  If full working . The only thing you have to do is: look for the email address and replace with your own email, and you have the script ready to run on your website.
Remember the PHP script only works when is uploaded to the server... If not it will not send any information to your email, If you try to run on your PC you will see the page with error codes..

Thanks to Everyone in this forum for everything..

LINK TO DOWNLOAD ZIP FILE

http://www.mediafire.com/?yl6zx6qm64l6af1

Offline boyfrom75

  • VIP
  • ****
  • Posts: 21
  • Karma: +5/-0
    • View Profile
Re: Contact Us 2.0. with HTML Page and Pop Up Frame
« Reply #1 on: December 19, 2011, 01:24:17 PM »
Its someone going to post any comments for my small work...? :(

Offline Psion

  • Supporter
  • **
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Contact Us 2.0. with HTML Page and Pop Up Frame
« Reply #2 on: March 26, 2012, 05:30:08 AM »
Hi i just registered to give a feedback for you.

I try your script, and without any changes stays on the loading page (I try with Comodo Dragon (Chrome engine)) and with Opera the php code is show after i click the `Request a Pickup`button, with Firefox the  from is showing, but some php code is above the form.

I don`t want to criticize your work, this is just a feedback. Thanks for all your effort.

Offline janos

  • Contributor
  • *****
  • Posts: 43
  • Karma: +3/-0
    • View Profile
Re: Contact Us 2.0. with HTML Page and Pop Up Frame
« Reply #3 on: March 26, 2012, 11:08:33 AM »
Try with this code: request.php  :)

Code: [Select]
<?php $email 'info@example.com'?>
<head>
<SCRIPT LANGUAGE="JavaScript">
function checkEmail(ccForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(ccForm.jemail.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
return (false)
}
//  End -->
</script>
<script type="text/javascript">
function make_blank()
{
document.ccform.jname.value ="";
}
</script>
<script type="text/javascript">
function makes_blank()
{
document.ccform.jemail.value ="";
}
</script>
<script type="text/javascript">
function pmakes_blank()
{
document.ccform.jphone.value ="";
}
</script>
<script type="text/javascript">
function cmakes_blank()
{
document.ccform.jcity.value ="";
}
</script>
<script type="text/javascript">
function tmake_blank()
{
document.ccform.jfeed.value ="";
}
</script>
<style type="text/css">
h4{
 font-family:"trebuchet ms";
color:#555;
}
#formes {
align:center;
margin:auto 0;
width:469px;
padding-top:10px;
padding-bottom:10px;
border:1px dotted #ccc;
background-color:#FAFAFA;
font-family:"trebuchet ms";
font-size:12px;
}

#fname {
              width:355px;
   border:#ccc solid 1px;
   background:#fff url(images/user.png) no-repeat left;
              padding-left:44px;
              font-family:"trebuchet ms";
              font-size:13px;
              color:#555;
}
#femail {
              width:355px;
   border:#ccc solid 1px;
   background:#fff url(images/email.png) no-repeat left;
              padding-left:44px;
              font-family:"trebuchet ms";
              font-size:13px;
              color:#555;
}
#fphone {
              width:355px;
   border:#ccc solid 1px;
   background:#fff url(images/phone.png) no-repeat left;
              padding-left:44px;
              font-family:"trebuchet ms";
              font-size:13px;
              color:#555;
}
#fcity {
              width:355px;
   border:#ccc solid 1px;
   background:#fff url(images/city.png) no-repeat left;
              padding-left:44px;
              font-family:"trebuchet ms";
              font-size:13px;
              color:#555;
}
#sfeed {
              width:355px;
   border:#ccc solid 1px;
   background:#fff url(images/text_signature.png) no-repeat top left;
              padding-left:44px;
              font-family:"trebuchet ms";
              font-size:13px;
              color:#555;
             
}
#sbutton {
             width:82px;
             height:25px;
             border:0;
             display:block;
              background-image: url(images/button.png);
              background-repeat: no-repeat;
              font-family:"trebuchet ms";
              font-size:13px;
              color:#555;
             
}


</style>
</head>
<body>
<div align="center">
<?php
if(isset($_POST['submit']))
{
$jname $_POST['jname'];
$jemail $_POST['jemail'];
$jphone $_POST['jphone'];
$jcity $_POST['jcity'];
$jfeed $_POST['jfeed'];
////////
$time date ("h:i A"); 
$date date ("l, F jS, Y");
$urlh getenv('HTTP_HOST');
    
$urls dirname($_SERVER['PHP_SELF']);
    
$urls preg_replace('/\//'''$urls);
    
$url "http://$urlh/$urls";
$ip $_SERVER['REMOTE_ADDR'];
$headers 'From: System Admin';
$subject "You have a new Laundry Request for Pick Up";
$bodys "Message:\n$jfeed\n\n
Contact Us Form\n\n$date at $time.\n\n
IP Address.$ip \n\n
E Address: $jemail\n\n
Name: $jname \n\n
Url: $url\n\n 
Phone: $jphone \n\n
City: $jcity \n\n"
;
///////////////
$name=array($jname,$jemail,$jphone,$jcity,$jfeed);
foreach (
$name as $name
{
        if (
preg_match("/</"$name)) {
            echo 
"<center><div id=\"toprow\">Invalid Characters \"<\" HTML is not allowed";
            Die();
        }
        if (
preg_match("/\\[/"$name)) {
            echo 
"<center><div id=\"toprow\">Invalid Characters \"[\" BB code is not allowed";
            Die();
        }
if (
strlen($name) > 250) {
echo 
"<center><div id=\"formes\">The field cannot contain more than 150 characters:
<a href=\"javascript:history.go(-1)\">Go Back</a></div></center>"
;  
 Die();
}
if (
strlen($name) < 4) {
echo 
"<center><div id=\"formes\">Min 4 characters:
<a href=\"javascript:history.go(-1)\">Go Back</a></div></center>"
;  
 Die();
}
}
mail($email$subject$bodys"From: $email");
echo 
"<center><div id=\"formes\">We have successfully received your request! Someone will get in touch with you to coordinate a pick-up time and details. </div></center>";  
}else{
?>

<h4><font color="#ff9966">Please fill in the form below:</font></h4>
<form name=ccform id="formes" action="request.php" method="post" onSubmit="return checkEmail(this)">
<p><input name="jname" type="text" id="fname" value="Name" onclick="make_blank();"></p>
<p><input name="jemail" type="text" id="femail" value="Email" onclick="makes_blank();"></p>
<p><input name="jphone" type="text" id="fphone" value="Phone" onclick="pmakes_blank();"></p>
<p><input name="jcity" type="text" id="fcity" value="Address and Apartment No" onclick="cmakes_blank();"></p>
<p><textarea name="jfeed" id="sfeed" value='Your Message' onclick="tmake_blank();" rows="3" cols="25">Your Message</textarea></p>
<p><input id="sbutton" type="submit" name="submit" value="Submit"></p>
</form>
<?php
}
?>

</div>