PHP syntax is jacked. Using custom fields in a unique way
-
My syntax is jacked. I tried to use custom fields in an interesting way but I jacked it all up.
Basically I want to display specific PHP (<?php insert_cform (‘6’) ; ?>) based on what was written in the custom field. I am hoping my logic was somewhat correct, but I just messed up the syntax. I am more of a CSS guy so any help would be appreciated.
<?php $jobtype = get_post_meta($post->ID, 'job-type', true); ?> <?php if $jobtype = 'web' { $jobresumetype = '<?php insert_cform ('4') ; ?>' }; elseif $jobtype = 'design'{ $jobresumetype = '<?php insert_cform ('5') ; ?>' }; else if $jobtype = 'copy'{ $jobresumetype = '<?php insert_cform ('6') ; ?>' }; else $jobresumetype = '' }; ?> <?php echo $jobresumetype; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PHP syntax is jacked. Using custom fields in a unique way’ is closed to new replies.