Can the server run out of memory?
Moderator: General Moderators
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
Can the server run out of memory?
I am using php to user input via a form. When the form is submited it posts the data to itself and then displays it on the next screen for the user to verify. When the user is happy and they hit submit on the verification screen the data is again posted via the form (this time as type hidden) to itself.
On the 3rd and final screen I show a confirmation message and I am opening a new window via a popup. I am posting the data to the new window via variables in the url. In total I am posting 28 variables. On the resulting page I can only aceess the first 15. If I remove variables 1-15 and send only 16-28. So I know my code is correct but why can I not access all of the variables?
Is this a memory issue?
Thanks,
Rob.
On the 3rd and final screen I show a confirmation message and I am opening a new window via a popup. I am posting the data to the new window via variables in the url. In total I am posting 28 variables. On the resulting page I can only aceess the first 15. If I remove variables 1-15 and send only 16-28. So I know my code is correct but why can I not access all of the variables?
Is this a memory issue?
Thanks,
Rob.
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
Here is my popup:
Then on the popup window:
As I mentioned I am sending 28 variables. 21 send ok. If I remove number 21 so that what was 22 then becomes 21 it works where as previously it doesn't. So the code is correct.
Rob.
Code: Select all
function popjack(printflag){
window.open('../waybill/waybill.php?ship_day=<? echo"$ship_day"; ?>
&ship_month=<? echo"$ship_month"; ?>
&ship_year=<? echo"$ship_year"; ?>
&print='+escapeprintflag),'popjack','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbar=no,width=650,height=534');
}Code: Select all
$ship_day = $_GET["ship_day"];
$ship_month = $_GET["ship_month"];
$ship_year = $_GET["ship_year"];Rob.
Ah! Yes, the original reply was probably correct. I got sidetracked when you mentioned that you were using forms and the post method, which is a different matter altogether.
The querystring is limited in length, so probably you are hitting this limit.
One way around it is to store the values in a session variable instead of the querystring.
Sorry, I was being a little dense there!
The querystring is limited in length, so probably you are hitting this limit.
One way around it is to store the values in a session variable instead of the querystring.
Sorry, I was being a little dense there!
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
the code i have described above is in a file called functions.php which contains a function which I have written called 'waybill'.
The script functions.php is called from another named main.php. Main uses sessions variables. Can I register session variables within the function 'waybill'. At the moment when I do this they do not seem to work.
Rob.
The script functions.php is called from another named main.php. Main uses sessions variables. Can I register session variables within the function 'waybill'. At the moment when I do this they do not seem to work.
Rob.
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
u can always do <form action="some_page.php" target="new"> and when you click submit it will auto make a popup window and the post variables will automatically be there in the $_POST array. that would probebly be much easier than manually putting in all the variables in the javascript window.open thing.
-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
I'm sure you're hitting the 255 char length limit of the url.
why not just grab the values of the form fields on the pop-up window?
ie:
why not just grab the values of the form fields on the pop-up window?
ie:
Code: Select all
<form name="e;MyForm"e;>
<input type="e;text"e; name="e;var1"e;>
</form>Code: Select all
<script>
var var1 = opener.document.MyForm.var1.value;
// do whatever you want with var1 now
</script>