This is my code.. The problem is that the code after the '>' in if(mysql_affected_rows()>0) id displayed as plain text in the webpage.. Please help..
<?php
session_start();
if( isset( $_POST[reg] ) )
{
$name = $_POST[n1];
$age = $_POST[a1];
$gen = $_POST[r1];
$phno = $_POST[phno1];
$email = $_POST[email1];
$pin = $_POST[pin1];
$user = $_POST[u1];
$pas = $_POST[pass];
$pas1 = $_POST[pass1];
$i = $_POST[i1];
include( "connect.php" );
$q = "INSERT INTO reg VALUES('0', '$name', '$age', '$gen', '$phno', '$email', '$pin', '$user', '$pas')";
mysql_query( $q ) or die( mysql_error() );
if(mysql_affected_rows()>0)
{
header("location:index.php");
}
}
?>