Jump to content

[SOLVED] Form help


ianco

Recommended Posts

I have tome tick boxes that show text when ticked but I want the text to display a number that I enter in the form. I can make the different text appear with the different tick box, but noting happenes where the <php echo $_POST["num"]; > is. It just appears as sometext "" some text.

 

Can any one suggest anything that might make the number appear?

Taa

 

<?PHP

$ch1 = ' ';

$ch2 = ' ';

$ch3 = ' ';

 

if (isset($_POST['Submit1'])) {

 

if (isset($_POST['ch1'])) {

$ch1 = $_POST['ch1'];

 

 

if ($ch1 = 'net')

{

 

$ch1 = 'Sometext"<php echo $_POST["num"]; >".pdf some text';

}

}

etc}

?>

---------

Output

<?PHP print $ch1; ?><br>

Link to comment
https://forums.phpfreaks.com/topic/175590-solved-form-help/
Share on other sites

Just noticed something i didnt before..

 

This line:

 

$ch1 = 'Sometext"<php echo $_POST["num"]; >".pdf some text';

 

Could be the source of your problem. As your putting <?php ?> tags within an already open <?php ?> tag. The proper way to write that line would be..

 

$ch1 = "Sometext" . $_POST['num'] . ".pdf some text";

 

try replacing your line with this one and tell me if that changes anything.

 

Link to comment
https://forums.phpfreaks.com/topic/175590-solved-form-help/#findComment-925289
Share on other sites

Archived

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

×
×
  • Create New...

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.