It doesn't execute twice. It executes once. Your code says this:
IF number of selected rows is greater than 0:
[indent]Let the user know that there is already an event in the database.[/indent]
ELSE:
[indent]Run the insert query AND tell them that the event was saved.[/indent]
Looks like it's working as coded to me...
Indenting your code helps here...
session_start();
include "../config.php";
$event_id=$_GET['id'];
$sqlcheck = "Select * from user_events where user_id='$_SESSION[Userid]' and event_id='$event_id'";
$resultcheck = mysql_query($sqlcheck);
include "../topnav.php";
if (mysql_num_rows($resultcheck) > 0)
{
echo "<br><br>We already have this event saved for you<br><br>Please click <a href=\"viewevent.php\">here</a> to go back to the events.<br><br>";
} // Closes the IF statement
else
{
$sql = "Insert INTO user_events (user_id, event_id) values ('$_SESSION[Userid]', '$event_id')";
mysql_query($sql) or die(mysql_error());
echo "<br><br>Your event was saved!<br>Please click <a href=\"viewevent.php\">here</a> to go back to the events.<br>";
} // Closes your else statement
include "../bottomnav.php";