Hi
I have followed (except with the change of details) a script fragment from PHP MySQL 4th Edition. It is shown below:
<?php
$thispage = "contact";
session_start();
$cart = '';
$notice = '';
$order = NULL;
if (isset($_SESSION['cart'])) {
$cart = $_SESSION['cart'];
session_destroy();
$notice = "<b>Most parts have a left and right side. If you only intend to order one or the other, please delete the side not required. Also, <span style='color:red;'>please change the Enquiry Type to either “Parts Order” or “Parts Enquiry”.</span> Remember to fill in your details at the top of the form. Thank you.</b>";
$order = "Parts Order";
$enquiry = "Parts Enquiry";
}
I am getting the error message:
[31-May-2012 15:23:38] PHP Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
Apart from no knowing how to fix this, I am also not sure where line 0 would be. Is it something I should worry about, or can I just let it ride. I know it is possible to live with PHP Notices, but am also not sure about Warnings.
I have checked in the manual, and it seems that register_globals is a bad thing. But I haven’t a clue how to avoid getting this warning.
Thanks