error_reporting and display_errors are already as you mentioned. And I tried your code and it directed to google.com.
And I wrote
header('Location: http://google.com');to signup.php, it also worked there.
Thank you very much for your helping. I tried different combinations. the simple file directed to my.index.php, but not the signup.php
I'm sending the final versions of my codes :
register.php
<?php
// load Smarty library
require('C:\wamp\smarty\libs\Smarty.class.php');
$smarty = new Smarty();
$smarty->display('kayit.tpl');
?>
register.tpl
<html>
<body>
<form name = 'signupform' id = 'signupform' method = "post" action = "signup.php" >
<table border="0" cellpadding="5" cellspacing="0">
<tr>
<td>username:</td>
<td><input type="text" name='user_name' /></td>
</tr>
<tr>
<td>name:</td>
<td><input type="text" name='first_name' /></td>
</tr>
<tr>
<td>lastname:</td>
<td><input type="text" name='last_name' /></td>
</tr>
<tr>
<td>E-mail:</td>
<td><input type="text" name='email' /></td>
</tr>
<tr>
<td>password:</td>
<td><input type="password" name='password'/></td>
</tr>
<tr>
<td><br/></td>
<td><input id = 'signupbutton' type='submit' value='register' /></td>
</tr>
</table>
</form>
</body>
</html>
signup.php
<?php
$mysql_hostname = "localhost";
$mysql_user = "root";
$mysql_password = "";
$mysql_database = "ozoverflow";
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("veritabanına erisilemedi");
mysql_select_db($mysql_database, $bd) or die("veritabanı secilemedi");
$user_name = $_POST['user_name'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$password = $_POST['password'];
$email = $_POST['email'];
$signup_query="INSERT INTO user (user_name, first_name, last_name, email, password) VALUES ('$user_name', '$first_name', '$last_name', '$email', '$password')";
$signup_result=mysql_query($signup_query);
if($signup_result)
//header('Location: http://google.com');
header('Location : myindex.php');
else
{ echo "error occured" . mysql_error(); }
?>
Again thank you very much!