View Full Version : help on php
faisal01
September 18th, 2006, 04:25 PM
plz tell me will this work
<?PHP
<?PHP
PHP CODES
?>
?>
bwh2
September 18th, 2006, 04:53 PM
huh? maybe you meant to use the
here's the code tags?
raz
September 18th, 2006, 05:45 PM
<?php
// php codes
?>
????
blazes
September 18th, 2006, 05:57 PM
No you'll get tons of parsing errors...????
ZephyrWest
September 18th, 2006, 07:39 PM
I think he's trying to nest php tags...
Templarian
September 18th, 2006, 09:38 PM
Why would you ever need to nest a php tag?
if your importing a .php you use .inc.php i believe and don't use start or end php tags when inside an include file.
obiAdmin
September 18th, 2006, 11:25 PM
Why would you ever need to nest a php tag?
if your importing a .php you use .inc.php i believe and don't use start or end php tags when inside an include file.
That is correct. You would just use:
<?php
include('thispage.php');
?>
:huh:
faisal01
September 19th, 2006, 07:09 AM
<?PHP
<title>Thank You</title>
<body bgcolor="#FFFFFF" link="#54B8EC" vlink="#54B8EC" alink="#54B8EC" text="#000000" topmargin="0" leftmargin="0">
<font size="1" face="Verdana">
$template_full = <<<HTML
<?PHP
if(isset($_POST['submit'])) {
$to = "faisal@sphynkterstudios.com";
$subject = "GoForDeal.com Your Deal";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone_field = $_POST['phn'];
$bsttimecontact = $_POST['bsttimecontact'];
$body = "From: $name_field\n Phone: $phone_field\n E-Mail: $email_field\n Best Time To Contact: $bsttimecontact";
echo "you're data has been submitted to owner of this product you will be contact back soon.";
mail($to, $subject, $body);
} else {
echo "error!";
}
?>
HTML;
?>
i want to make this work...
faisal01
September 19th, 2006, 04:34 PM
??
faisal01
September 20th, 2006, 08:17 AM
Can this (include('thispage.php'); ) work between html tags like
<?PHP
$template_full = <<<HTML
include("done.inc.php");
HTML;
?>
??????
raz
September 20th, 2006, 03:22 PM
Umm... just wrap anything thats php with <?php code ?> then the rest of your HTML. You can do that as many times as you wish inside of an HTML document (as long as the extension is .php). Such as:
<div id="header">Welcome <strong><?php echo $_SESSION['username']; ?></strong>!</div>
That would simply produce a div layer with the CSS styles header applied to it (#header). Print "Welcome" in HTML, then print the username thats offered in the session.
evildrummer
September 20th, 2006, 03:52 PM
PHP tags can go through HTML, bad description, so I THINK this would work?
<?php
if (num1 < num2) {
num3 = 8;
?>
// HTML
<?php
}
?>
//HTML
<?php
print (num8);
?>
faisal01
September 20th, 2006, 05:11 PM
hmm well its not working.. plz help me out
blazes
September 20th, 2006, 05:39 PM
<html>
<title>Thank You</title>
<body bgcolor="#FFFFFF" link="#54B8EC" vlink="#54B8EC" alink="#54B8EC" text="#000000" topmargin="0" leftmargin="0">
<font size="1" face="Verdana">
<?php
$template_full = //not sure what goes here
if(isset($_POST['submit'])) {
$to = "faisal@sphynkterstudios.com";
$subject = "GoForDeal.com Your Deal";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone_field = $_POST['phn'];
$bsttimecontact = $_POST['bsttimecontact'];
$body = "From: $name_field\n Phone: $phone_field\n E-Mail: $email_field\n Best Time To Contact: $bsttimecontact";
echo "you're data has been submitted to owner of this product you will be contact back soon.";
mail($to, $subject, $body);
} else {
echo "error!";
}
?>
faisal01
September 21st, 2006, 05:07 AM
well i tried this... i want this $template_full = ///HTML in one PHP and
if(isset($_POST['submit'])) {
$to = faisal@sphynkterstudios.com;
this in other php...
bwh2
September 21st, 2006, 09:32 AM
@faisal01: use the
here's the code tags for your code. it will automatically show color syntax highlighting.
faisal01
September 21st, 2006, 09:37 AM
well thanks for helping i figured it out...
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.