Variable NOT Posting? Is my code valid? This used to work.

Here is the break down of my sample code:
(I removed all the rest of my page to try and simplify things and to help find the error)

Test1.php
[php]

Test1.php [/php]

Test2.php
[php]

Test2.php <?php if ($get == "") { $get = "ERROR: No File Name Was Recieved"; } echo "$get"; ?> [/php]

This code used to work for me, but now I always get the “ERROR: No File Name Was Recieved”.
So it appears to not be receiving the variable $get from the previous page. Why?

Thoughts:
Is this code valid anymore? Maybe an update has broke it?
Are my global settings wrong?

Any help would be greatly appreciated!

Thanks,
RiCK

i made some changes to you php codes

please replace

[php]

<?php $get = $_POST['get']; if ($get == "") { $get = "ERROR: No File Name Was Recieved"; } echo "$get"; ?>

[/php]

to be honest i don’t know how worked before lol

Wow, thanks. A very quick reply too!! :smiley:

I will try the new code now.

$get = $_POST[‘get’];

That one line fixed it!! :smiley:

Thanks again so much, now my pages are working again!
I’m not sure how it used to work either, but I think it did in an older version of PHP.
Anyways, everything is back to normal.

Your help is really appreciated!

Thank you,
RiCK

you are welcome
glad that i helped

Sponsor our Newsletter | Privacy Policy | Terms of Service