مشکل در ارسال اطلاعات حجیم از یک فرم به صفحه دیگر

mhofayyaz

Member
سلام
من یه صفحه به نام add.php دارم که مقاله رو به do.add.php می فرستم . اما اگه مقاله حجمش زیاد باشه ، بهش گیر می ده . وقتی بررسی می کنم ، می بینم که اصلاً نمی تونه $_POST["atxtFullstory"] رو دریافت کنه و می گه که خالیه ! ! اما روی لوکال که تست می کنم ، همون مقاله با موفیت ارسال میشه ! دلیلش چیه ؟ مشکل از سیشن هم نیست . چون سیشن رو هم برداشتم ولی کار نکرد . حتی تو صفحه do.add.php کد زیر رو میذارم ، مقاله های حجیم رو خالی نشون می ده و مگه چیزی ارسال نشده :
PHP:
 <?php 
die($_POST["atxtFullstory"]); 
?>

add.php
PHP:
<?php
defined("_nayzar_admin__") or die("invalid request");
$title="ارسال مطلب";
$sql="SELECT * FROM category WHERE Org='1'";
$result=@mysql_query($sql);
while($row=@mysql_fetch_assoc($result))
{
    $categories[]=$row;
}
$count=count($categories);
include("includes/header.inc.php");
?>
<script LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=50,left = 100,top = 120');");
}
</script>
    <script type="text/javascript">
      _editor_url = "../";
      _editor_lang = "en";
    </script>
    <script type="text/javascript" src="../htmlarea.js"></script>
    <script type="text/javascript">
      HTMLArea.loadPlugin("TableOperations");
      HTMLArea.loadPlugin("SpellChecker");
      HTMLArea.loadPlugin("CSS");
      function initDocument() {
        var css_plugin_args = {
          combos : [
            { label: "Syntax",
              options: { "None"           : "",
                         "Code" : "code",
                         "String" : "string",
                         "Comment" : "comment",
                         "Variable name" : "variable-name",
                         "Type" : "type",
                         "Reference" : "reference",
                         "Preprocessor" : "preprocessor",
                         "Keyword" : "keyword",
                         "Function name" : "function-name",
                         "Html tag" : "html-tag",
                         "Html italic" : "html-helper-italic",
                         "Warning" : "warning",
                         "Html bold" : "html-helper-bold"
                       },
              context: "pre"
            },
            { label: "Info",
              options: { "None"           : "",
                         "Quote"          : "quote",
                         "Highlight"      : "highlight",
                         "Deprecated"     : "deprecated"
                       }
            }
          ]
        };
        var editor1 = new HTMLArea("text-area-1");
        editor1.registerPlugin(TableOperations);
        editor1.registerPlugin(SpellChecker);
        editor1.registerPlugin(CSS, css_plugin_args);
        editor1.config.pageStyle = "@import url(dynamic.css);";
        editor1.generate();
        var editor2 = new HTMLArea("text-area-2");
        editor2.registerPlugin(TableOperations);
        editor2.registerPlugin(SpellChecker);
        editor2.registerPlugin(CSS, css_plugin_args);
        editor2.config.pageStyle = "@import url(dynamic.css);";
        setTimeout(function() {
          editor2.generate();
        }, 500);
        //---------------------------------------------------------------------
      };

      HTMLArea.init();
      HTMLArea.onload = initDocument;

    </script>
<?php
echo Fform("index.php?p=2","addnews","");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" dir="rtl">
  <tr>
    <?php
    if($_SESSION["Add_news_MSG"])
    {
        echo $_SESSION["Add_news_MSG"];
        $_SESSION["Add_news_MSG"]="";
    }
    ?>
    </p></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>تيتر مطلب :</td>
    <td><label>
      <input name="atxtTitle" type="text" value="<?php echo $_SESSION["atxtTitle"]; ?>" size="60">
    </label></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
 <td>&nbsp;</td>
<td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>نویسنده : </td>
    <td><input name="txtWriter" type="text" value="<?php echo $_SESSION["txtWriter"]; ?>" size="40" /></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="35">موضوع</td>
    <td><select name="atxtCategory" id="atxtCategory">
<?php
           for($i=0;$i<$count;$i++)
            {
              $category=$categories[$i];
              $id=$category["ID"];
              $name=$category["Name"];
              $main=$category["Main"];
              if($main=='0')
              {
                   for($f=0;$f<$count;$f++)
                 {
                    $category2=$categories[$f];
                    $id2=$category2["ID"];
                  $name2=$category2["Name"];
                  $main2=$category2["Main"];
                  if($main2==$id)
                  {
?>
        <option value="<?php echo $id2; ?>" <?php if($_SESSION["atxtCategory"]==$id2) echo "selected"; ?>><?php echo $name."->".$name2; ?></option>
<?php
                  }
                 }
            }
        }
                 ?>
    </select></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>عکس : </td>
    <td><input dir="rtl" name="txtSImage" type="text" value="<?php echo $_SESSION["txtSImage"]; ?>" size="60" />
    <a href=javascript:popUp("../home.php?p=4") title="ارسال عکس"  rel="category tag">ارسال عکس</a></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>خلاصه خبر : </td>
    <td><label>
      <textarea id="text-area-1" name="atxtShortstory" style="width: 150%; height: 30em; background:#FFFFFF">
<?php echo $_SESSION["atxtShortstory"]; ?>
      </textarea>
    </label></td>
    <td>&nbsp;</td>
  </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>متن کامل : </td>
    <td>
      <textarea id="text-area-2" name="atxtFullstory" style="width: 100%; height: 30em; background:#FFFFFF">
<?php echo $_SESSION["atxtFullstory"]; ?>
      </textarea>
   </td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>نمایش خبر : </td>
    <td>بله <input type="radio" value="0" name="Active" <?php if($_SESSION["Active"]==1 || !$_SESSION["Active"]) echo "checked"; ?>/>  خیر <input type="radio" value="1" name="Active" <?php if($_SESSION["Active"]==2) echo "checked"; ?>/></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
      <input type="submit" name="Submit" value="ارسال">    </td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</form>
<?php
echo Llink("index.php","back","","بازگشت به صفحه اصلی<br>");
include("includes/footer.inc.php");
?>

do.add.php
PHP:
<?php

defined("_nayzar_admin__") or die("invlaid request");



$title=$_SESSION["atxtTitle"]=htmlspecialchars($_POST["atxtTitle"]);

$writer=$_SESSION["txtWriter"]=htmlspecialchars($_POST["txtWriter"]);

$category=$_SESSION["atxtCategory"]=htmlspecialchars($_POST["atxtCategory"]);

$image=$_SESSION["txtSImage"]=htmlspecialchars($_POST["txtSImage"]);

$shortstory=$_SESSION["atxtShortstory"]=trim($_POST["atxtShortstory"]);

$fullstory=$_SESSION["atxtFullstory"]=$_POST["atxtFullstory"];

//$fullstory=str_replace('\\','',$fullstory1);



if(!$category)

{

    $_SESSION["Add_news_MSG"]="لطفاً موضوع را انتخاب کنيد !";

    Redirect("index.php?p=1");

}



if(!$shortstory)

{

    $_SESSION["Add_news_MSG"]="لطفاً خطلاصه خبر مطلب را وارد کنيد !";

    Redirect("index.php?p=1");

}



if(!$fullstory)

{

    $_SESSION["Add_news_MSG"]="لطفاً خبر کامل مطلب را وارد کنيد !";

    Redirect("index.php?p=1");

}



if(!$image)

    {

        $_SESSION["Add_news_MSG"]="لطفاً عکس خبر را انتخاب کنید";

        Redirect("index.php?p=1");        

    }



//End Write

$date=date("Y-m-d");



$sql="INSERT INTO news 

                        (Title, Writer, Category, Image, Shortstory,  Fullstory, Date, Active)

                VALUES    ('$title', '$writer', '$category', '$image', '$shortstory', '$fullstory', '$date', '$active')";

if(!@mysql_query($sql))

{

    $_SESSION["Add_news_MSG"]="There is an error ! Please try later!";

    Redirect("index.php?p=1");

}



$_SESSION["atxtTitle"]="";

$_SESSION["atxtCategory"]="";

$_SESSION["txtWriter"]="";

$_SESSION["atxtShortstory"]="";

$_SESSION["atxtFullstory"]="";

$_SESSION["Active"]="";

$_SESSION["txtSImage"]="";



$_SESSION["Add_news_MSG"]="مطلب با موفقیت ثبت شد!";

Redirect("index.php?p=1");

?>
 

جدیدترین ارسال ها

بالا