URL Var's not working.
Posted by: lolopo (---.tnainc.com)
Date: May 05, 2006 10:24PM

On my ISP Host, they use PHP 4.3. I got tired of uploading files all the time so I wanted to be able to test PHP locally. On the ISP Host, the page ran 100% correctly. I did a default insall of WAMP5. PHP seems work just fine. For example

<?php echo "this is a PHP Line"; ?>

Works correctly. However, I've got a variable passed through the URL called PageContent. If I run something like

<?php
if (isset($PageContent)){
echo "Var is $PageContent";
}
?>

The variable gets ignored. This exact same page works 100% correctly on my ISP Host. I think that it might be a problem with the way Dreamweaver or WAMP is handling the URL var.

Any suggestions?



Post Edited (05-08-06 16:22)

Options: ReplyQuote
Re: URL Var's not working.
Posted by: chaokusc (---.server.ntli.net)
Date: June 06, 2006 09:13AM

let me know if you solve this problem, i wish to use this too for so many projects and hope its being supported soon

Options: ReplyQuote
Re: URL Var's not working.
Posted by: k776 (---.bliink.ihug.co.nz)
Date: June 07, 2006 05:53AM

Thats because your ISP has register_globals on, not very smart of them I might add. Changing $PageContent to $_GET['PageContent'] and any others like it will fix the problem

Also, <? is turned off by default I think. Therefore you need to use <?php instead. All these are good coding practices.

Options: ReplyQuote
Re: URL Var's not working.
Posted by: CyberSpatium (67.170.181.---)
Date: June 07, 2006 01:01PM

register globals are disabled in WAMP php.ini file. for security reasons, keep that setting disabled. The developers of PHP disabled register_globals by default starting with php 4.2.0.

Options: ReplyQuote


Sorry, only registered users may post in this forum.