I have a little problem, i want to get my unique generated variable from a PHP page to another page but in jquery to use'it in a link. Here is my code !
page reg.php
<?php $randstring = "variable" ?>
page index.php
$("#subscribe_form").submit(function()
{
//remove all the class add the messagebox classes and start fading
$("#msgboxs").removeClass().addClass('messagebox').text('Validating....').fadeIn(1200);
//alert ('Pass 1');
$.post("a_subscribe.php",{ firstname:$('#firstname').val(),lastname:$('#lastname').val(),email:$('#email').val(),phone:$('#phone').val(),rand:Math.random() }, function(data)
{
var dataarray= data.split(',');
if(dataarray[0]=='yes') //if correct login detail
{
$("#msgboxs").fadeTo(2000,1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$("#msgboxs").html('').removeClass()
//$("#msgboxs").html(dataarray[1]).addClass('messageboxok')
$("#artist-form").hide();
$("#request-success").show();
here i need to take the variable to use in window.open
how i can extract variable from upper page , $randstring
window.open(url, "http://clubgtm.com/en/confirmemail?gt='.$randstring.'")
purl.jsto get the querystring and then usesplitto get what you need.window.open(url, "http://clubgtm.com/en/confirmemail?gt=<?php echo $randstring; ?>")?$randstring = "variable"2.index.php=rand:Math.random()3.index.php=$.post("a_subscribe.php"4.$randstring window.open(url, "http://clubgtm.com/en/confirmemail?gt=So could you explain clearly from what page to what page do you want to pass value? where that value appear first (reg.php, index.php, confirmemail.php)?