Hello everyone, by typing these few words I am already shaking from fear, that I will get flamed as hell but well, I will give it a try.
I would like to change a php mailto button I have in my theme which looks like this:
<a class="mailto" href="mailto:<?php $comail=get_post_meta($post->ID, 'wtf_comail', true); echo $comail; ?>?Subject= Hello - <?php the_title(); ?> "> Hello</a>
into a button which would instead link to a page, entered into db as $comail. I tryed and did this:
<input type="button" class="Hello" name="button" value="Hello" onclick="<?php $comail=get_post_meta($post->ID, 'wtf_comail', true); echo $comail; ?>';" />
Obviously I loose the styling as well, so the atribute "class" just does not work there, but there is an solution for that. Where I am lost is the php, if someone could help with this, I would remember his forum nickname until the last day. Thanks a lot in advance.