دوست عزیز این کد صفحه ی ثبت ناممه بنظرت کجاش اشتباهه من که نفهمیدم!!!!!!؟؟؟ممنون میشم اگه بگید.
<?php require_once('Connections/conection_reddesign.php'); ?>
<?php require_once('Connections/config.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "signup")) {
$insertSQL = sprintf("INSERT INTO ``user`` (name, familly, mostaar, sen, sex, user_name, user_pass) VALUES (%s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['familly'], "text"),
GetSQLValueString($_POST['mostaar'], "text"),
GetSQLValueString($_POST['sen'], "int"),
GetSQLValueString($_POST['sex'], "text"),
GetSQLValueString($_POST['user_name'], "text"),
GetSQLValueString($_POST['user_pass'], "text"));
mysql_select_db($database_conection_reddesign, $conection_reddesign);
$Result1 = mysql_query($insertSQL, $conection_reddesign) or die(mysql_error());
}
?>
<!doctype html>
<html dir="rtl">
<head>
<meta charset="utf-8"/>
<title>ثبت نام</title>
<link href="files/style/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="all">
<div class="form_signup">
<form name="signup" method="POST" action="<?php echo $editFormAction; ?>">
<p>ثبت نام در سایت:</p>
<p>بهتر است تمام فیلدها را پر نمایید.</p>
<hr>
نام:
<input name="name" type="text" class="form_signup1" id="name">
</br>
</br>
نام خانوادگی:
<input name="familly" type="text" class="form_signup1" id="familly">
</br>
</br>
نام مستعار:
<input name="mostaar" type="text" class="form_signup1" id="mostaar">
</br>
</br>
سن:
<input name="sen" type="text" class="form_signup1" id="sen">
</br>
</br>
جنسیت:
<select name="sex" class="form_signup1" id="sex">
<option value="man">مرد</option>
<option value="famle">زن</option>
</select>
<hr color="#FF0000">
ایمل:
<input name="user_name" type="text" class="form_signup1" id="user_name" dir="ltr">
</br>
</br>
رمز عبور:
<input name="user_pass" type="password" class="form_signup1" id="user_pass" dir="ltr">
<p>
<input type="submit" name="Submit" id="button" value="ثبت نام">
<input type="reset" name="Reset" id="button" value="ثبت نام مجدد">
</p>
<input type="hidden" name="MM_insert" value="signup">
</form>
</div>
<div class="text">
</br>
<?php echo $row_theme['tozih'];?>
</div>
<div class="baner" id="apDiv1"></div>
<!--<div class="baner"></div>-->
</div>