amir4oracle
Programmer
I have a file base.php, which is calling a file compose.php using:
include ('compose.php');
compose.php is a form with just two fields, which roughly as follows:
---------------------------------------
<?php
if (isset ($_POST['submit']))
{
// validation checks
// and database insertion
}
?>
<html><body>
.
.
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" >
<input type="text" name="subj" value="<?php echo $_POST['subj']; ?>">
<input type="text" name="bdy" value="<?php echo $_POST['bdy']; ?>">
<input type="submit" value="Send" name="submit">
</form>
.
.
</body></html>
----------------------------------------
the thing is if i call compose.php separately using:
it works exactly as required, but when its called from base.php using the include or include_once or require or require_once functions, the if check as mentioned does not work so does not the rest of the php tagged part. Although the the form is displayed just fine.
What should I do to include compose.php and make it work as required. Your help is highly appreciated.
include ('compose.php');
compose.php is a form with just two fields, which roughly as follows:
---------------------------------------
<?php
if (isset ($_POST['submit']))
{
// validation checks
// and database insertion
}
?>
<html><body>
.
.
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" >
<input type="text" name="subj" value="<?php echo $_POST['subj']; ?>">
<input type="text" name="bdy" value="<?php echo $_POST['bdy']; ?>">
<input type="submit" value="Send" name="submit">
</form>
.
.
</body></html>
----------------------------------------
the thing is if i call compose.php separately using:
it works exactly as required, but when its called from base.php using the include or include_once or require or require_once functions, the if check as mentioned does not work so does not the rest of the php tagged part. Although the the form is displayed just fine.
What should I do to include compose.php and make it work as required. Your help is highly appreciated.