Jump to content


Photo

php statements inside php statements! I'm lost!


  • Please log in to reply
2 replies to this topic

#1 mattonedime

mattonedime
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 12 October 2006 - 10:04 PM

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!!

#2 TEENFRONT

TEENFRONT
  • Members
  • PipPipPip
  • Advanced Member
  • 338 posts

Posted 12 October 2006 - 10:29 PM

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
Teenfront.co.uk : Free Teen Chat -  FunkySmileys.co.uk : MSN Smileys -  ArcadeMonkey.co.uk : Free Flash Games
8Baller.co.uk : Free Multiplayer Pool [url=http://8Baller.co.uk]

#3 mattonedime

mattonedime
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 12 October 2006 - 11:28 PM

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!!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users