CodeCanyon

Lightbox Revolution

8 posts
  • Has been a member for 0-1 years
mehrany says

i want, form contact inlightbox and if u have send form email, page of thanks for email load on lightbox. how?!

8 posts
  • Has been a member for 0-1 years
mehrany says

form contact: php ::


<?php

$EmailFrom = "no-reply@______";
$EmailTo = "__________";
$Subject = "Contact";
$name = Trim(stripslashes($_POST['name']));
$mail = Trim(stripslashes($_POST['mail'])); 
$comment = Trim(stripslashes($_POST['comment'])); 

// validation
$validationOK=true;
if (!$validationOK) {
  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
  exit;
}

// prepare email body text
$Body = "";
$Body .= "name: ";
$Body .= $name;
$Body .= "\n";
$Body .= "mail: ";
$Body .= $mail;
$Body .= "\n";
$Body .= "comment: ";
$Body .= $comment;
$Body .= "\n";

// send email 
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page 
if ($success){
  print "<meta http-equiv=\"refresh\" content=\"0;URL=checks.html\">";
}
else{
  print "<meta http-equiv=\"refresh\" content=\"0;URL=contact.html\">";
}
?>

i want if u have click send, show checks.html in to the lightbox

173 posts
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
  • Sold between 1 000 and 5 000 dollars
  • Canada
  • Exclusive Author
  • Referred between 1 and 9 users
KBRmedia says

If you want to show just the content of checks.html, you can use the file_get_contents() function.

Example You can replace this:

// redirect to success page 
if ($success){
  print "<meta http-equiv=\"refresh\" content=\"0;URL=checks.html\">";
}

By this:
// redirect to success page 
if ($success){
   echo file_get_contents("checks.html");
}

This is one of many ways to show an external file if you are not redirecting user to another page, using PHP. You can also use jQuery to do the exact same thing (Hint: Search $.load() on google).

8 posts
  • Has been a member for 0-1 years
mehrany says

not work it error is : Warning: file_get_contents(checks.html) [function.file-get-contents]: failed to open stream: No such file or directory in wwwroot\emails.php on line 35

lin 35 is :
   echo file_get_contents("checks.html");
3401 posts
  • Australia
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 2-3 years
  • Interviewed on the Envato Notes blog
  • Microlancer Beta Tester
  • Sold between 1 000 and 5 000 dollars
Australia says

not work it error is : Warning: file_get_contents(checks.html) [function.file-get-contents]: failed to open stream: No such file or directory in wwwroot\emails.php on line 35 lin 35 is :
   echo file_get_contents("checks.html");

..path

8 posts
  • Has been a member for 0-1 years
mehrany says

What? path?!

8 posts
  • Has been a member for 0-1 years
mehrany says

ok, i patch this error, but not not load page checks.html in lightbox

8 posts
  • Has been a member for 0-1 years
mehrany says

Please Help me :(

8 posts
  • Has been a member for 0-1 years
mehrany says

ajax loading?!

173 posts
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
  • Sold between 1 000 and 5 000 dollars
  • Canada
  • Exclusive Author
  • Referred between 1 and 9 users
KBRmedia says

not work it error is : Warning: file_get_contents(checks.html) [function.file-get-contents]: failed to open stream: No such file or directory in wwwroot\emails.php on line 35
You are getting that error because you need the path to checks.html. So if your contact.php and checks.html are not in the same directory you need to add the directory to file_get_contents("PATH/TO/checks.html")

If you want to use jQuery, simply use $(“HOLDER”).load(“http://YOURSITE/checks.html”)

by
by
by
by
by