Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter swami12

    (@swami12)

    Would that be $c_year = mysql_real_escape_string($_GET[‘spiffycalyear’]);

    to

    $c_year = $_GET[‘spiffycalyear’];

    ?

    yes

    Thread Starter swami12

    (@swami12)

    YESSSSSSSS!!!!

    That was it, I guess.

    Thanks much for your real time support ??

    That’s great. I will make note to replace those calls on the next update.

    Thread Starter swami12

    (@swami12)

    Oops, we are now unable to edit or delete past events. Message is ” An event with that ID couldn’t be found”.

    Could this have something to do with our changes to the PHP yesterday?

    Can create new events.

    thanks again

    N

    Find that string in the code, and just above there is another call to mysql_escape_string. Try removing that call and just use the the following:

    $wpdb->get_results(“SELECT * FROM ” . WP_SPIFFYCAL_TABLE . ” WHERE event_id='” . $event_id . “‘ LIMIT 1”);

    This code is old and deprecated. I won’t have a chance to update for a while since I am quite busy at the moment.

    Thread Starter swami12

    (@swami12)

    Sorry, confused. I do not see ANY mysql_escape_string in the code any more. So, I don’t know what to replace.

    Sorry, that should be “mysql_real_escape_string”. Search the code for “An event with that ID”, then look just above it.

    Thread Starter swami12

    (@swami12)

    Again, sorry, my knowledge of PHP is limited….. here’s the code I tried to use and it obviously is wrong since I got White Screen of Death til I reverted ??

    // The event edit form for the manage events admin page
    	function wp_events_edit_form($mode='add', $event_id=false)
    	{
    		global $wpdb,$users_entries;
    		$data = false;
    
    		if ( $event_id !== false ) {
    			if ( intval($event_id) != $event_id ) {
    				echo "<div class=\"error\"><p>".__('Bad event ID','spiffy-calendar')."</p></div>";
    				return;
    			} else {
    				$wpdb->get_results("SELECT * FROM " . WP_SPIFFYCAL_TABLE . " WHERE event_id='" . $event_id . "' LIMIT 1");
    
    				if ( empty($data) ) {
    					echo "<div class=\"error\"><p>".__("An event with that ID couldn't be found",'spiffy-calendar')."</p></div>";
    					return;
    				}
    				$data = $data[0];
    			}
    			// Recover users entries if they exist; in other words if editing an event went wrong
    			if (!empty($users_entries)) {
    				$data = $users_entries;
    			}
    		} else {
    			// Deal with possibility that form was submitted but not saved due to error - recover user's entries here
    			$data = $users_entries;
    		}

    Can you email [email protected] so we can continue our conversation there?

    This is a site-specific issue so it isn’t helpful to discuss here.

    Thread Starter swami12

    (@swami12)

    Done.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Next/Prev Month error’ is closed to new replies.