what is &rsaquo in php (wordpress)?

I am a beginner in programming and php. I am trying to understand how this form works. usually when the submit button in the form is clicked the action will be assigned to some filename.php to get processed by post or get method. but i donot know how this form is processed (i can understand form fields are using few functions from other php files) In particular i want to understand this

<input type="button" name="goback" value="<?php _e( 'Go back', APP_TD);?>" onclick="history.back()" /> <input type="submit" name="step2" value="<?php _e( 'Continue &rsaquo;&rsaquo;', APP_TD ); ?>" /> 

This is one of the file from wordpress theme I am copying the full code of that file containing form.

 global $current_user, $wpdb; $error_msg = false; // check to see if there are images included // then valid the image extensions if ( ! empty( $_FILES['image'] ) ) $error_msg = cp_validate_image(); // check to see is ad pack specified for fixed price option if ( $cp_options->price_scheme == 'single' && cp_payments_is_enabled() && ! isset( $_POST['ad_pack_id'] ) ) $error_msg[] = __( 'Error: no ad pack has been defined. Please contact the site administrator.', APP_TD ); $error_msg = apply_filters( 'cp_listing_validate_fields', $error_msg ); // images are valid if ( ! $error_msg ) { // create the array that will hold all the post values $postvals = array(); // delete any images checked if ( ! empty( $_POST['image'] ) ) cp_delete_image(); // update the image alt text if ( ! empty( $_POST['attachments'] ) ) cp_update_alt_text(); // upload the images and put into the new ad array if ( ! empty( $_FILES['image'] ) ) $postvals = cp_process_new_image(); if ( ! empty( $_POST['app_attach_id'] ) ) $postvals['app_attach_id'] = $_POST['app_attach_id']; if ( ! empty( $_POST['app_attach_title'] ) ) $postvals['app_attach_title'] = $_POST['app_attach_title']; // put all the posted form values into an array foreach ( $_POST as $key => $value ) { if ( ! is_array( $_POST[ $key ] ) ) $postvals[ $key ] = appthemes_clean( $value ); else $postvals[ $key ] = array_map( 'appthemes_clean', $value ); } // keep only numeric, commas or decimal values $postvals['cp_price'] = ( empty( $_POST['cp_price'] ) ) ? '' : appthemes_clean_price( $_POST['cp_price'] ); if ( isset( $postvals['cp_currency'] ) && ! empty( $postvals['cp_currency'] ) ) $price_curr = $postvals['cp_currency']; else $price_curr = $cp_options->curr_symbol; // keep only values and insert/strip commas if needed if ( ! empty( $_POST['tags_input'] ) ) { $postvals['tags_input'] = appthemes_clean_tags( $_POST['tags_input'] ); $_POST['tags_input'] = $postvals['tags_input']; } // store the user IP address, ID for later $postvals['cp_sys_userIP'] = appthemes_get_ip(); $postvals['user_id'] = $current_user->ID; $ad_pack_id = ( isset( $_POST['ad_pack_id'] ) ) ? appthemes_numbers_only( $_POST['ad_pack_id'] ) : false; if ( $ad_pack_id ) $postvals['pack_duration'] = cp_get_ad_pack_length( $ad_pack_id ); $coupon = false; if ( cp_payments_is_enabled() ) { // see if the featured ad checkbox has been checked if ( isset( $_POST['featured_ad'] ) ) { $postvals['featured_ad'] = $_POST['featured_ad']; // get the featured ad price into the array $postvals['cp_sys_feat_price'] = $cp_options->sys_feat_price; } // calculate the ad listing fee and put into a variable $postvals['cp_sys_ad_listing_fee'] = cp_ad_listing_fee($_POST['cat'], $ad_pack_id, $postvals['cp_price'], $price_curr); // calculate the total cost of the ad if ( isset( $postvals['cp_sys_feat_price'] ) ) $postvals['cp_sys_total_ad_cost'] = cp_calc_ad_cost($_POST['cat'], $ad_pack_id, $postvals['cp_sys_feat_price'], $postvals['cp_price'], $coupon, $price_curr); else $postvals['cp_sys_total_ad_cost'] = cp_calc_ad_cost($_POST['cat'], $ad_pack_id, 0, $postvals['cp_price'], $coupon, $price_curr); //UPDATE TOTAL BASED ON MEMBERSHIP //check for current users active membership pack and that its not expired if ( ! empty( $current_user->active_membership_pack ) && appthemes_days_between_dates( $current_user->membership_expires ) > 0 ) { $postvals['cp_membership_pack'] = get_pack( $current_user->active_membership_pack ); //update the total cost based on the membership pack ID and current total cost $postvals['cp_sys_total_ad_cost'] = get_pack_benefit( $postvals['cp_membership_pack'], $postvals['cp_sys_total_ad_cost'] ); //add featured cost to static pack type if ( isset( $postvals['cp_sys_feat_price'] ) && in_array( $postvals['cp_membership_pack']->pack_type, array( 'required_static', 'static' ) ) ) $postvals['cp_sys_total_ad_cost'] += $postvals['cp_sys_feat_price']; } } // prevent from minus prices if bigger discount applied if ( ! isset( $postvals['cp_sys_total_ad_cost'] ) || $postvals['cp_sys_total_ad_cost'] < 0 ) $postvals['cp_sys_total_ad_cost'] = 0; // now put the array containing all the post values into the database // instead of passing hidden values which are easy to hack and so we // can also retrieve it on the next step $option_name = 'cp_' . $postvals['oid']; update_option( $option_name, $postvals ); ?> <div></div> <h2><?php _e( 'Review Your Listing', APP_TD ); ?></h2> <img src="<?php echo appthemes_locate_template_uri('images/step2.gif'); ?>" alt="" /> <?php do_action( 'appthemes_notices' ); ?> <form name="mainform" action="" method="post" enctype="multipart/form-data"> <ol> <?php // pass in the form post array and show the ad summary based on the formid echo cp_show_review( $postvals ); ?> </ol> <div></div> <div><?php cp_display_message( 'terms_of_use' ); ?></div> <div></div> <p> <?php _e( 'By clicking the proceed button below, you agree to our terms and conditions.', APP_TD ); ?> <br /> <?php _e( 'Your IP address has been logged for security purposes:', APP_TD ); ?> <?php echo $postvals['cp_sys_userIP']; ?> </p> <p> <input type="button" name="goback" value="<?php _e( 'Go back', APP_TD ); ?>" onclick="history.back()" /> <input type="submit" name="step2" value="<?php _e( 'Continue &rsaquo;&rsaquo;', APP_TD ); ?>" /> </p> <input type="hidden" name="oid" value="<?php echo $postvals['oid']; ?>" /> </form> <div></div> <?php } else { ?> <h2><?php _e( 'An Error Has Occurred', APP_TD ); ?></h2> <div> <p><?php echo appthemes_error_msg( $error_msg ); ?></p> <input type="button" name="goback" value="&lsaquo;&lsaquo; <?php _e( 'Go Back', APP_TD ); ?>" onclick="history.back()" /> </div> <?php } ?> 
4

2 Answers

All that code to query a character sequence? Well, that's what it is, &rsaquo; represents the character . So, the content becomes Continue ››. The sequence is parsed from its HTML entity to that. It has nothing strictly to do with PHP or Wordpress, just HTML.

In case you find another one and wonder what it does, you can find a full list of these "HTML character entity references" on Wikipedia for example.

4

I got the answer the actual process that is happening here is multistage form. the hidden input type processes the form here and sends the values to the next page/stage of the form. this is done here to hide the values from the user and process it in next stage

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like