php

This is a discussion on php within the PHP forums in Programming Languages category; I'm running into an odd problem - I have a conditional include statement at the bottom of my file, embedded in a table. If the condition is met, the include file is included, as it should be. However, any HTML that is after the include statement does not get executed. But, this only occurs when the include is included. If the condition is not met, the file is not included, and all HTML code displays correctly. Am I missing something stupid? Thanks, Joe...

Go Back   Application Development Forum > Programming Languages > PHP

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-07-2000, 10:56 AM
joe@jwebmedia.com
Guest
 
Default HTML not displaying after PHP include statement...

I'm running into an odd problem - I have a conditional include statement
at the bottom of my file, embedded in a table. If the condition is met,
the include file is included, as it should be. However, any HTML that is
after the include statement does not get executed. But, this only occurs
when the include is included. If the condition is not met, the file is
not included, and all HTML code displays correctly. Am I missing
something stupid? Thanks,

Joe

Reply With Quote
  #2  
Old 11-07-2000, 11:01 AM
facosta@ops.magnux.com.br
Guest
 
Default Re: [PHP] HTML not displaying after PHP include statement...

Did you see your log?
It's probably a parse error.
------------------------
Frederico Augusto Costa
facosta@magnux.com.br
------------------------

On Tue, 7 Nov 2000 joe@jwebmedia.com wrote:

> I'm running into an odd problem - I have a conditional include statement
> at the bottom of my file, embedded in a table. If the condition is met,
> the include file is included, as it should be. However, any HTML that is
> after the include statement does not get executed. But, this only occurs
> when the include is included. If the condition is not met, the file is
> not included, and all HTML code displays correctly. Am I missing
> something stupid? Thanks,
>
> Joe
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>


Reply With Quote
  #3  
Old 11-07-2000, 11:55 AM
joe@jwebmedia.com
Guest
 
Default Re: [PHP] HTML not displaying after PHP include statement...

There was nothing in the log about a parse error, or anything at all. here's
a little code...

No html will display after this is run:

<?if($errorcode == ""):?>
<TABLE align=CENTER border=1>
<TR>
<TD COLSPAN="2" ALIGN="CENTER"><FONT FACE="Helvetica,
Arial"><STRONG>Successful! Thank You!</STRONG></FONT></TD>
</TR>
<TR>
<TD COLSPAN="2"><FONT FACE="Helvetica, Arial">You will receive an order
confirmation via e-mail shortly. However, you should keep the following
information for your records:</FONT></TD>
</TR>
<TR>
<TD>Order ID:</TD>
<TD><?echo $orderid;?></TD>
</TR>
<TR>
<TD>Order Amount:</TD>
<TD><?echo $price;?></TD>
</TR>
</TABLE>
<?else:?>
<?print_error($errormessage);?>
<?endif;?>

function print_error($errormessage) {

$errormessage = str_replace("\\", "", $errormessage);

$table = "<TABLE CELLSPACING=\"0\" CELLPADDING=\"4\" BORDER=\"0\"
WIDTH=\"380\">\n";
$table .= "\t\t<TR>\n";
$table .= "\t\t\t<TD ALIGN=\"CENTER\">";
$table .= "<STRONG><FONT FACE=\"Arial, Helvetica\">There was an error
processing your order!</FONT></STRONG>";
$table .= "</TD>\n";
$table .= "\t\t</TR>\n";
$table .= "\t\t<TR>\n";
$table .= "\t\t\t<TD>";
$table .= "<FONT FACE=\"Arial, Helvetica\">".$errormessage."</FONT>";
$table .= "</TD>\n";
$table .= "\t\t</TR>\n";
$table .= "\t\t<TR>\n";
$table .= "\t\t\t<TD>";
$table .= "<FONT FACE=\"Arial, Helvetica\">If this appears to be a problem
with your credit card information, please go <A
HREF=\"javascript:history.go(-1)\">back</A> and try again. A copy of this
message has been e-mailed to the system administrator.</FONT>";
$table .= "</TD>\n";
$table .= "\t\t</TR>\n";
$table .= "\t</TABLE>\n";

echo $table;

//mail("joe@jwebmedia.com", "ibuydeals Order Error!", $errormessage, "From:
errors@ibuydeals.com");

}

Any ideas?

Thanks,

Joe

facosta@ops.magnux.com.br wrote:

> Did you see your log?
> It's probably a parse error.
> ------------------------
> Frederico Augusto Costa
> facosta@magnux.com.br
> ------------------------
>
> On Tue, 7 Nov 2000 joe@jwebmedia.com wrote:
>
> > I'm running into an odd problem - I have a conditional include statement
> > at the bottom of my file, embedded in a table. If the condition is met,
> > the include file is included, as it should be. However, any HTML that is
> > after the include statement does not get executed. But, this only occurs
> > when the include is included. If the condition is not met, the file is
> > not included, and all HTML code displays correctly. Am I missing
> > something stupid? Thanks,
> >
> > Joe
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >

>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net


Reply With Quote
  #4  
Old 11-07-2000, 12:00 PM
joe@jwebmedia.com
Guest
 
Default Re: [PHP] HTML not displaying after PHP include statement...

I found my problem. In the include file there was an exit statement that
was causing this. Makes sense...Thanks!

Joe

Reply With Quote
  #5  
Old 10-04-2002, 02:25 AM
Ernani Joppert Pontes Martins
Guest
 
Default Re: php

Hi Murat,

You can generate the code above with php and the javascript is a text that
the browser will execute...

PHP has its processes on the server site...ie.: Your webserver....

Javascrip has its processes on the browser of any user who wants to access
your webserver....

HTH,

Ernani


"Murat Saygili" <saygili@altay.com.tr> escreveu na mensagem
news:006601cb7809$5f8ff5e0$7d00000a@altaymrk...
> hello friends,
> is it possible to write the below code just using php without javascript.
>
>
>
>
> <HTML>
> <HEAD>
> <TITLE>first</TITLE>
> <META NAME="description" CONTENT="">
> <META NAME="keywords" CONTENT="R">
> <script language="JavaScript">
> function AksiyonDegis (aksiyon){
> document.Formum.action = aksiyon;
> document.Formum.submit();
> }</script>
> </HEAD>
> <BODY>
> <form action="" method="post" name="Formum">
> Tar1: <input type="text" name="tar1" size="25" maxlength="30"><br>
> Tar2: <input type="text" name="tar2" size="25" maxlength="30"><br>
> <input type="button" value="Ekle" onClick="AksiyonDegis('test1.php3')">
> <input type="button" value="Güncelle"
> onClick="AksiyonDegis('test2.php3')">
> <input type="button" value="Sil"

onClick="AksiyonDegis('test7.php3')">
> <input type="button" value="Bul"

onClick="AksiyonDegis('test5.php3')">
> <input type="button" value="Bul"

onClick="AksiyonDegis('test5.php3')">
> </form>
> </BODY>
> </HTML>
>



Reply With Quote
  #6  
Unread 10-30-2010, 04:06 AM
Murat SAYGILI
Guest
 
Default php

hello friends,
is it possible to write the below code just using php without javascript.




<HTML>
<HEAD>
<TITLE>first</TITLE>
<META NAME="description" CONTENT="">
<META NAME="keywords" CONTENT="R">
<script language="JavaScript">
function AksiyonDegis (aksiyon){
document.Formum.action = aksiyon;
document.Formum.submit();
}</script>
</HEAD>
<BODY>
<form action="" method="post" name="Formum">
Tar1: <input type="text" name="tar1" size="25" maxlength="30"><br>
Tar2: <input type="text" name="tar2" size="25" maxlength="30"><br>
<input type="button" value="Ekle" onClick="AksiyonDegis('test1.php3')">
<input type="button" value="Güncelle"
onClick="AksiyonDegis('test2.php3')">
<input type="button" value="Sil" onClick="AksiyonDegis('test7.php3')">
<input type="button" value="Bul" onClick="AksiyonDegis('test5.php3')">
<input type="button" value="Bul" onClick="AksiyonDegis('test5.php3')">
</form>
</BODY>
</HTML>

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:39 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.