Member Avatar for stephen_UK

Hi there I would be grateful if you could point me in the right direction with this issue please:

Only PAGE 1 loads regardless of content of $choice.

if ($choice='yes') {
?><script>location.replace("http://~PAGE 1");</script>
<?php
} else {
?><script>location.replace("http://~PAGE 2");</script>
<?php 
}

Thanks in advance

Stephen

I'm not sure, but maybe try using if ($choice == 'yes')

Member Avatar for stephen_UK

I'm not sure, but maybe try using if ($choice == 'yes')

Thanks for that. That has solved it. My original code had == but when it didnt work I tried a single =.

There must have been another fault which I solved in the mean time, but I had induced this fault along the way.

Cheers

Stephen

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.