Jump to content

Archived

This topic is now archived and is closed to further replies.

mattonedime

php statements inside php statements! I'm lost!

Recommended Posts

Hello..

I have a php script that uses <?php echo '<html>  to display an entire HTML page.. Well on that HTML page I want to run <?php $_POST["value"];  ?>  It seems like it ignores my "embedded" PHP commands.. I am pretty new to this, so any guidence would be great!

And heres what I am doing..
I have an online store that pulls information from a form, reports it to the customer(this is the step I am not able to get the $_POST results to show), then submits the information to the shopping cart.. This works like a charm if I run the PHP script as a standalone page, its when I try to embed it into the store (which is 100% php) that it stops working.

THANKS!!

Share this post


Link to post
Share on other sites
why echo the entire html document? Only echo the php content.

so..

<html>
blahs blah blah
<? echo $value ?>
blah blah blah more html stuff..
</html>

save page as .php

Share this post


Link to post
Share on other sites
See, sometimes it takes a simple answer! hahaha Thanks, I took out the ecapsulating <?php ehco ' and it works like a charm.. How did I miss that.. LOL  Thanks!!!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.