I've started to use this laptop as well as my normal PC to make my website on, but something's gone wrong. I have this at the top of the page:
<?php
//just in case we've got no parameters...
if (!$type | !$file) {
echo "<meta http-equiv=\"Refresh\" content=\"0; ../?note=1\">";
}
But if I go to the page with the link view.php?type=flash&file=ball (which has got parameters), it still follows the link and replaces the page. This never happened on the other machine so I've obviously done something wrong with setting up PHP. Any ideas?You may have global variables turned off, in which case you will need to add:
$type = $_GET["type"]
$file = $_GET["file"];Also, I believe you need to use || for or, not just one.Do both of the things mentioned above change your | to || and add $_GET to the code...
<?php
//just in case we've got no parameters...
if (!$_GET['type'] || !$_GET['file']) {
echo "<meta http-equiv=\"Refresh\" content=\"0; ../?note=1\">";
}
<?php
//just in case we've got no parameters...
if (!$type | !$file) {
echo "<meta http-equiv=\"Refresh\" content=\"0; ../?note=1\">";
}
But if I go to the page with the link view.php?type=flash&file=ball (which has got parameters), it still follows the link and replaces the page. This never happened on the other machine so I've obviously done something wrong with setting up PHP. Any ideas?You may have global variables turned off, in which case you will need to add:
$type = $_GET["type"]
$file = $_GET["file"];Also, I believe you need to use || for or, not just one.Do both of the things mentioned above change your | to || and add $_GET to the code...
<?php
//just in case we've got no parameters...
if (!$_GET['type'] || !$_GET['file']) {
echo "<meta http-equiv=\"Refresh\" content=\"0; ../?note=1\">";
}