President Bush on Wednesday accused Democratic challenger John F. Kerry of demoralizing Iraqis and U.S. troops by sending "mixed signals" about the war in Iraq.

At a rally in this northwestern suburb of Philadelphia, Bush told a few hundred supporters gathered in a convention center that "you cannot lead the war against terror if you wilt or waver when times get tough."

"Mixed signals are wrong signals," he said.

Bush made his remarks at a forum billed as a discussion of education. Bush touted his No Child Left Behind Act and accused the Massachusetts senator of backing away from his support for the program for political reasons.

The portrayal of Kerry as a flip-flopper on issues including education and foreign policy, a staple of recent campaign events, was reiterated in a new ad by the Bush campaign, dubbed "Windsurfing," which shows Kerry tacking in opposite directions.

In Washington, Vice President Cheney amplified Bush's message on a visit to Capitol Hill. "John Kerry gives every indication that his repeated efforts to cast and recast and redefine the war on terror and our operations in Iraq and Afghanistan -- of someone who lacks the resolve, the determination and the conviction to prevail in this conflict," Cheney said.

The vice president did not respond to a question about the violence in Iraq.

Cheney said that under Kerry the country would "revert back to the pre-9/11 mind-set," a time when "we were struck repeatedly and never responded effectively." According to the commission that probed the Sept. 11, 2001, attacks, Cheney was urged early in the administration to respond to the attack on the USS Cole, but no action was taken.

The Democratic vice presidential nominee, John Edwards, issued a retort to Cheney. "George Bush and Dick Cheney are the last two people we need a lecture from about how to keep the American people safe," he said. "It is the height of absurdity for Dick Cheney, a chief architect of the Iraq quagmire, to talk about the leadership needed to fix the mess in Iraq that he created."

Bush began the day in New York, meeting over breakfast at the Waldorf-Astoria hotel with Pakistani President Pervez Musharraf, who became a key U.S. ally after the Sept. 11 terrorist attacks.

A senior administration official, who spoke to reporters on the condition that he not be named, said the two leaders discussed the hunt for al Qaeda and Taliban militants on the country's border with Afghanistan, relations between Pakistan and India, and nuclear proliferation.

Musharraf, like other leaders Bush met with during the U.N. General Assembly this week, also inquired how the U.S. presidential election would play out, the official said. "They're all curious how it's going," he added. "They're all politicians, and at one time or another they all have their own elections."

Accompanied by Laura Bush, the president flew to Pennsylvania, his 37th visit to the state, where he is running neck and neck with Kerry for the state's 21 electoral votes.

During the midday forum in this Philadelphia suburb, Bush defended the No Child Left Behind Act, a cornerstone of his education policy that has drawn praise and criticism for its focus on testing to mark progress and hold schools accountable.

"My opponent supported No Child Left Behind," the president said, referring to Kerry's Senate vote in favor of the program. "Of course he gets into a tough campaign and he talks about weakening the accountability standards."

Kerry spokesman Phil Singer said that Bush has failed to fully fund the program, leaving schools vulnerable.

On Wednesday afternoon, Bush boarded a helicopter to survey the flood damage caused in Pennsylvania by the remnants of Hurricane Ivan. "The federal government has an obligation to help, and we will," he told reporters afterward.

Arriving by helicopter in Latrobe, Pa., home of the Rolling Rock brewery, Bush was introduced by golf legend Arnold Palmer at an evening rally at the local airport. Referring to the recent kidnapping and murder of American hostages in Iraq, the president told a few thousand supporters that the insurgents "cannot defeat our military -- the only thing they can do is behead people and try to shake our will."

Bush was scheduled to return to Washington on Wednesday night and planned to appear with Iraqi Prime Minister Ayad Allawi at the White House on Thursday morning before flying to Maine for an afternoon campaign stop.

Staff writer Dana Milbank in Washington contributed to this report.

Campaigning at the Valley Forge Convention Center, President Bush poses with students from the Russell Byers Charter School of Philadelphia.