$_POST[first_name] in variable not showing up

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ringartdesign
Forum Newbie
Posts: 21
Joined: Wed Sep 10, 2008 10:11 am

$_POST[first_name] in variable not showing up

Post by ringartdesign »

I've got this variable that uses based on user input, uses POST to output their name:

if (($_POST['age'] >= 18) && ($_POST['age'] <= 64))
$maincopy = '<p><CENTER>Thank you <b>$_POST[first_name]</b> for requesting a quote.<br />
Your are eligible for heatlh insurance rates as low as:<br />';

but when the page is published what I get is this text on the front end:

Thank you $_POST[first_name] for requesting a quote.
Your are eligible for heatlh insurance rates as low as:

I bet my syntax is wrong somewhere, but for some reason, I'm overlooking it. Any help?
mini4
Forum Newbie
Posts: 4
Joined: Thu Oct 23, 2008 1:17 am

Re: $_POST[first_name] in variable not showing up

Post by mini4 »

try like this:
$maincopy = "<p><CENTER>Thank you <b>".$_POST['first_name']."</b> for requesting a quote.<br />
Your are eligible for heatlh insurance rates as low as:<br />";
ringartdesign
Forum Newbie
Posts: 21
Joined: Wed Sep 10, 2008 10:11 am

Re: $_POST[first_name] in variable not showing up

Post by ringartdesign »

thank you this worked!

problem solved :)
Post Reply