Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

brower can't perform PHP staments in a HTML file

Status
Not open for further replies.

418418

Technical User
Jan 13, 2004
6
0
0
HK
Hi,

This is a rookie problem.
when I use a HTML file to call another php file, there
is nothing showing up on the brower. However it would be ok If I directly open the php file on the brower.

Any hints ?

 
I think that the issue there is that you're using HTML to do a statement it doesn't know how to intrepret. So since you're saying "include this php file" in your code, the code is still HTML. Now how we solved that issue here was we did an IFRAME and published the PHP file in the IFRAME. This way we could use PHP or ASP with no issues.

Digatle

xDigatle.png
 
Guys,

The following are the orginal HTML statment and the php statements . Acutally I just wanted the php executing an idiot task, which was displaying a line. However, that simple line never shows up.

###### HTML file #########

<form action=&quot;processorder.php&quot; method=post>
<table border=0>
<tr bgcolor=#cccccc>
<td width=150>item</td>
<td width=15>Quantity</td>
</tr>
<tr>
<td>Tires</td>
<td align=&quot;center&quot;><input type=&quot;text&quot; name=&quot;tireqty&quot; size=&quot;3&quot;
maxlength=&quot;3&quot;></td>
</tr>
<tr>
<td>Oil</td>
<td align=&quot;center&quot;><input type=&quot;text&quot; name=&quot;oilqty&quot; size=&quot;3&quot; maxlength=&quot;3&quot;></td>
</tr>
<tr>
<td>Spark Plugs</td>
<td align=&quot;center&quot;><input type=&quot;text&quot; name=&quot;sparkqty&quot; size=&quot;3&quot;
maxlength=&quot;3&quot;></td>
</tr>
<tr>
<td colspan=&quot;2&quot; align=&quot;center&quot;><input type=&quot;submit&quot; value=&quot;Submit Order&quot;></td>
</tr>
</table>
</form>


###### PHP file #########
<html>
<head>
<title> Bob's Auto Parts - Order Results</title>
</head>
<body>
<h1>Bob's Auto Parts</h1>
<h2>Order Results</h2>
<?php
echo '<p> Order processed.</p>';
?>
</body>
</html>
 
Dear sleipnir214,

Bingo !! That's the problem on my hand.


 
Yes, everything can be seen by Viewing Source, even that simple line.

I just can see it on my brower.

 
typo on previous reply.

Yes, everything can be seen by Viewing Source, even that simple line.

I just can't see it on my brower.

 
Tks to all.

I will looking for anthoer PC and see if the files produce
the same result or not.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top