posts on my site are usually like this
www.mysite.com/detail.php?topic=899

the user post $name, $email, $comment
there is an hidden field $hidden

After success posting comment i want it to send an email to their email saying blah blah...

In the email, i want to include the hidden field
so i include
www.mysite.com/detail.php?topic=$hidden
in the $body of the email

But when i check the email (used my email for testing) it doesn't show. How do i make it show?

real code is necessary to see what is wrong

$to = $emailEn;
$hidden = $_POST['pID']; // auto increment hidden field from the form
$subject = "Your Answer is now live";
$contents = "http://www.url.com/detail.php?topicid=$hidden";
$from_header = "From: noreply@url.com";
mail($to, $subject, $contents, $from_header);

Thanks but it didn't work.

Thanks but it didn't work.

what is it doing or not doing?

Not showing the number after the topicid=

Not showing the number after the topicid=

then you may have mistyped your form field name in your $_POST variable. Check it to see that you have done it correctly. Or better just type your code out.

unfortunately i haven't mistyped it. Thanks for the replies though

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.