Jump to content


other fixed for news.php



  • Please log in to reply
1 reply to this topic

#1 OFFLINE   nicky

nicky

    Sr.Member

  • Community VIP
  • PipPipPip
  • 98 posts
  • Joined 1 Year, 9 Months and 15 Days

Posted 03 January 2011 - 20:21

refresh not work's and notice for edit not work's
before
if (mysql_affected_rows() == 1)
		$warning = error_message("success","Success","News Item was Added Successfully  .");
      else
        error_message("error","Error","Something weird just happened.");
add
header("Location: $site_url/index.php");
and replace
$returnto = isset($_POST['returnto']) ? htmlentities($_POST['returnto']) : '';

		if ($returnto != "")
			header("Location: $site_url/index.php");
		else
			$warning = error_message("success","Success","News item was Edited Successfully.");
with
header("Location: $site_url/index.php");
		
			$warning = error_message("success","Success","News item was Edited Successfully.");

Edited by nicky, 03 January 2011 - 20:23.


#2 OFFLINE   Krypto

Krypto

    Project Leader

  • Administrators
  • PipPipPipPipPip
  • 1,581 posts
  • Joined 2 Years, 2 Months and 9 Days

Posted 03 January 2011 - 20:41

Alternatively

Find
if (mysql_affected_rows() == 1)
                $warning = error_message("success","Success","News Item was Added Successfully  .");
      else
        error_message("error","Error","Something weird just happened.");

Replace
header("refresh:1; $site_url/index.php");

	if (mysql_affected_rows() == 1)
		$warning = error_message("success","Success","News Item was Added Successfully.");
	else
		error_message("error","Error","Something weird just happened.");

Find
$returnto = isset($_POST['returnto']) ? htmlentities($_POST['returnto']) : '';

                if ($returnto != "")
                        header("Location: $site_url/index.php");
                else
                        $warning = error_message("success","Success","News item was Edited Successfully.");

Replace
header("refresh:1; $site_url/index.php");
			$warning = error_message("success","Success","News item was Edited Successfully.");






Also tagged with

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users