Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.