So I changed a couple things and this is what I have got:
<div onclick="generate_url('data input by php')">A button</div>
<div onclick="generate_url('different data)">A different button</div>
<div class="view_mode" onclick="change_mode('single')">Singular</div>
<div class="view_mode" onclick="change_mode('dual')">Dual</div>
var count = 0;
// Function to change view mode (working)
mode = newmode;
//Standard url that users selections are added to
// Function to generate a url or mutiple url's based off user input
//Allow user to choose a single option
window.location.href = singular_url;
window.location.href = dual_url;
So I fixed a couple of things, the count is now declared and assigned a variable not a string.
I also fixed the if(count==1) statement so it's not using an assignment.
I moved the if(count==1) statement above the if(count==0) statement so it would only activate the second time around.
Previously it would add the first user input twice into the url.
I am trying to get it so on the first click of one button it adds the first value dependent on what button the user clicked and on the second click it then adds a second user input and creates a url.
I now have the problem where it creates the following url
It should give the following
mywebsite.com/whatever?id=(FIRST INPUT)(SECOND INPUT)
I think it's to do with the variables not being passed from one loop to the next.