i want to pass long data value in next file using post method or in URL but it's say Submitted URI too large! how to solve this issue.
use PHP_SELF with form action to send character in length more than 65000 characters.
you can use $_SESSION
A session is a way to store information (in variables) to be used across multiple pages. Unlike a cookie, the information is not stored on the users computer. - W3Schools
Try this code using session
Index.php
<?php
//Index Page Storing variable
$_SESSION['var'] = $long_var;
?>
Action.php
<?php
//Action Page Getting session
$long_var= $_SESSION['var'];
?>
or use method POST/GET but add hidden input field just like this.
Index.php
<form method="POST" action="action.php">
<input type="hidden" name="var" value="long_var">
<input type="submit" name="submit">
</form>
Action.php
<?php
//getting POST variable from form
$long_var = $_POST['var'];
//getting GET variable from form
$long_var = $_GET['var'];
?>