Title: Error adding new links
Last modified: November 14, 2016

---

# Error adding new links

 *  [epi24](https://wordpress.org/support/users/epi24/)
 * (@epi24)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-adding-new-links/)
 * Hi there,
 * My name is Elias and I’m getting a syntaxis error at /wp-content/plugins/wp-affiliate-
   links/views/admin/edit/index.php in line 53
 * This is the line 53 : <?php $types = [
    ant this is the part of code with the
   problem:
 * ———————————————————————————————
 * <select name=”redirect_type”>
    <?php $types = [ ‘META_REFRESH’ => ‘Meta Refresh
   Redirect’, ‘FRAME’ => ‘Frame Redirect’, ‘JAVASCRIPT’ => ‘Javascript Redirect’,‘
   REFERER_MASK’ => ‘Referer Masking’, ‘301’ => ‘301 Permanent Redirect’, ‘302’ 
   => ‘302 Redirect Temporary’, ‘307’ => ‘307 Redirect Temporary’ ];
 *  foreach ($types as $type => $label) {
    $selected = ”; if($post[‘redirect_type’]
   == $type){ $selected = ‘selected=”selected”‘; } ?> <option value=”<?php echo 
   $type ?>” <?php echo $selected?><?php echo $label ?></option> <?php } ?> </select
   >
 * ———————————————————————————————
 * So I tried to fix it, changed it to:
 * ———————————————————————————————
 * <select name=”redirect_type”>
    <?php $types = array( ‘META_REFRESH’ => ‘Meta 
   Refresh Redirect’, ‘FRAME’ => ‘Frame Redirect’, ‘JAVASCRIPT’ => ‘Javascript Redirect’,‘
   REFERER_MASK’ => ‘Referer Masking’, ‘301’ => ‘301 Permanent Redirect’, ‘302’ 
   => ‘302 Redirect Temporary’, ‘307’ => ‘307 Redirect Temporary’ );
 *  foreach ($types as $type => $label) {
    $selected = ”; if($post[‘redirect_type’]
   == $type){ $selected = ‘selected=”selected”‘; } ?> <option value=”<?php echo 
   $type ?>” <?php echo $selected?><?php echo $label ?></option> <?php } ?> </select
   >
 * ———————————————————————————————
 * but it didn’t work, now the select “Cloaking Method” option at the template appears
   empty
 * How could I fix this problem?
 * Thanks for your time
 * regards Elias

Viewing 1 replies (of 1 total)

 *  Plugin Author [AjariAkuWordPress](https://wordpress.org/support/users/ajariakuwordpress/)
 * (@ajariakuwordpress)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/error-adding-new-links/#post-8618095)
 * What PHP version do you use?
    Because I develop it with PHP 5.4+ in mind 🙂

Viewing 1 replies (of 1 total)

The topic ‘Error adding new links’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-affiliate-links.svg)
 * [WP Affiliate Links](https://wordpress.org/plugins/wp-affiliate-links/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-affiliate-links/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-affiliate-links/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-affiliate-links/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-affiliate-links/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [AjariAkuWordPress](https://wordpress.org/support/users/ajariakuwordpress/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/error-adding-new-links/#post-8618095)
 * Status: not resolved