Jump to content

[SOLVED] page shows blank?


darkfreaks

Recommended Posts

anyone have an idea why ???

 

 

<?php
include ("inc/header.inc.php");
$headers = 'To: Ashley <viciousvamp@gmail.com>, Ashley <viciousvamp@gmail.com>' . "\r\n";
$headers .= 'From: $email <$email>' . "\r\n";
$email=strip_tags(trim($_POST['email']));
$name=strip_tags(trim($_POST['name']));
$name=strip_tags(trim($_POST['name']));
$action= $_SERVER['PHP_SELF'];

function checkEmail($email) 
{
   if(eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email)) 
   {
      return FALSE;
   }

   list($Username, $Domain) = split("@",$email);

   if(getmxrr($Domain, $MXHost)) 
   {
      return TRUE;
   }
   else 
   {
      if(fsockopen($Domain, 25, $errno, $errstr, 30)) 
      {
         return TRUE; 
      }
      else 
      {
         return FALSE; 
      }
   }
}



if (!isset($email)||!isset($name)||!isset($message)||empty($email)||empty($name)||empty($message)||checkEmail($email)==FALSE)
{
echo' <<<HTML

<div id="contact">
	<h2>You have an error please check your message and try again!</h2>
  <form id="contact_form" name="contact_form" method="post" action="'$action'">
  	<label>Name:<br />
		<input name="name" type="text" class="form" id="name" />  
	</label>
	<br /><br />
  	<label>Email:<br />
		<input name="email" type="text" class="form" id="email" />
 	</label>
  	<br /><br />
  		Message:<br />
  	<label>
  			<textarea name="message" cols="45" rows="5" class="form" id="message"></textarea>
  	</label>
  		<br /><br />
  	<label>
  			<input name="submit" type="submit" class="form_button" id="submit" value="Submit" />
  	</label>
  </form>
</div>

HTML';
}
elseif (isset($email)||isset($name)||isset($message)||!empty($message)||!empty($email)||!empty($name))
{
echo '<<<HTML

    <div id="contact">
      <form enctype="multipart/form-data" name="contact_form" method="post" action="'$action'">
<br /><br /><Br /><br /><b> Thank You,<br /><br />  Vicious Vamp will review your message soon!<br /><br /></b>
  </form>
</div>

HTML';

mail('viciousvamp@gmail.com','Mail for ViciousVamp',$message,$headers);
 }

else

echo '<<<HTML

    <div id="contact">
      <form id="contact_form" name="contact_form" method="post" action="'$action'">
        <label>Name:<br />
            <input name="name" type="text" class="form" id="name" />
        </label>
        <br /><br />
        <label>Email:<br />
            <input name="email" type="text" class="form" id="email" />
        </label>
        <br /><br />
        Message:<br />
        <label>
            <textarea name="message" cols="45" rows="5" class="form" id="message"></textarea>
        </label>
        <br /><br />
        <label>
            <input name="submit" type="submit" class="form_button" id="submit" value="Submit" />
        </label>
      </form>
    </div>

HTML';


include ("inc/footer.inc.php");

?>

Link to comment
Share on other sites

<?php
else
{ //missing
echo '<<<HTML

    <div id="contact">
      <form id="contact_form" name="contact_form" method="post" action="'$action'">
        <label>Name:<br />
            <input name="name" type="text" class="form" id="name" />
        </label>
        <br /><br />
        <label>Email:<br />
            <input name="email" type="text" class="form" id="email" />
        </label>
        <br /><br />
        Message:<br />
        <label>
            <textarea name="message" cols="45" rows="5" class="form" id="message"></textarea>
        </label>
        <br /><br />
        <label>
            <input name="submit" type="submit" class="form_button" id="submit" value="Submit" />
        </label>
      </form>
    </div>
HTML';
} //missing

the last else.

 

Link to comment
Share on other sites

yer, delete all the <<<<html, (are the spose to be comments or <html>)??

comments in PHP are // on one line or /* */ on more than one

 

Wrong.  You can leave that.  It's a special type of echo. I forget what it's called.  Anyway, it's fine.  Which line specifically is the error on?  Post it please. =)

Link to comment
Share on other sites

<?php
echo'<div id="contact">
	<h2>You have an error please check your message and try again!</h2>
  <form id="contact_form" name="contact_form" method="post" action="$_SERVER['PHP_SELF']">
  	<label>Name:<br />
		<input name="name" type="text" class="form" id="name" />  
	</label>
	<br /><br />
  	<label>Email:<br />
		<input name="email" type="text" class="form" id="email" />
 	</label>
  	<br /><br />
  		Message:<br />
  	<label>
  			<textarea name="message" cols="45" rows="5" class="form" id="message"></textarea>
  	</label>
  		<br /><br />
  	<label>
  			<input name="submit" type="submit" class="form_button" id="submit" value="Submit" />
  	</label>
  </form>
</div>

';
}
elseif (isset($email)||isset($name)||isset($message)||!empty($message)||!empty($email)||!empty($name))
{
echo '   <div id="contact">
      <form enctype="multipart/form-data" name="contact_form" method="post" action="$_SERVER['PHP_SELF']">
<br /><br /><Br /><br /><b> Thank You,<br /><br />  Vicious Vamp will review your message soon!<br /><br /></b>
  </form>
</div>
';

mail('viciousvamp@gmail.com','Mail for ViciousVamp',$message,$headers);
 }

else
{
echo '

    <div id="contact">
      <form id="contact_form" name="contact_form" method="post" action="$_SERVER['PHP_SELF']">
        <label>Name:<br />
            <input name="name" type="text" class="form" id="name" />
        </label>
        <br /><br />
        <label>Email:<br />
            <input name="email" type="text" class="form" id="email" />
        </label>
        <br /><br />
        Message:<br />
        <label>
            <textarea name="message" cols="45" rows="5" class="form" id="message"></textarea>
        </label>
        <br /><br />
        <label>
            <input name="submit" type="submit" class="form_button" id="submit" value="Submit" />
        </label>
      </form>
    </div>';
}

include ("inc/footer.inc.php");

?>

Link to comment
Share on other sites

Wrong. =(

<?php
echo'<div id="contact">
	<h2>You have an error please check your message and try again!</h2>
  <form id="contact_form" name="contact_form" method="post" action="{$_SERVER['PHP_SELF']}">
  	<label>Name:<br />
		<input name="name" type="text" class="form" id="name" />  
	</label>
	<br /><br />
  	<label>Email:<br />
		<input name="email" type="text" class="form" id="email" />
 	</label>
  	<br /><br />
  		Message:<br />
  	<label>
  			<textarea name="message" cols="45" rows="5" class="form" id="message"></textarea>
  	</label>
  		<br /><br />
  	<label>
  			<input name="submit" type="submit" class="form_button" id="submit" value="Submit" />
  	</label>
  </form>
</div>

';
}
elseif (isset($email)||isset($name)||isset($message)||!empty($message)||!empty($email)||!empty($name))
{
echo '   <div id="contact">
      <form enctype="multipart/form-data" name="contact_form" method="post" action="$_SERVER['PHP_SELF']">
<br /><br /><Br /><br /><b> Thank You,<br /><br />  Vicious Vamp will review your message soon!<br /><br /></b>
  </form>
</div>
';

mail('viciousvamp@gmail.com','Mail for ViciousVamp',$message,$headers);
 }

else
{
echo '

    <div id="contact">
      <form id="contact_form" name="contact_form" method="post" action="{$_SERVER['PHP_SELF']}">
        <label>Name:<br />
            <input name="name" type="text" class="form" id="name" />
        </label>
        <br /><br />
        <label>Email:<br />
            <input name="email" type="text" class="form" id="email" />
        </label>
        <br /><br />
        Message:<br />
        <label>
            <textarea name="message" cols="45" rows="5" class="form" id="message"></textarea>
        </label>
        <br /><br />
        <label>
            <input name="submit" type="submit" class="form_button" id="submit" value="Submit" />
        </label>
      </form>
    </div>';
}

include ("inc/footer.inc.php");

?>

 

That should work.  Copy and paste it where the form is. (just don't copy the PHP tags. Lol)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • 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.