1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to generate random TY url

Discussion in 'Blogging' started by eestisiin, Dec 30, 2013.

  1. eestisiin

    eestisiin Regular Member

    Joined:
    Oct 8, 2007
    Messages:
    329
    Likes Received:
    156
    Hi,

    im in need of a random thank you page url for each download thank you page in Wordpress. For example, you hit download and thank you page is generated like this

    http://mypage.com/thankyou5543 and next click is http://mypage.com/thankyou59959 or etc

    currently the code im using for thank you page is

    Code:
    <form method="post" action="/g/thanks?<?php echo rand_string( 5 ); ?>">
                            
                <input type="hidden" name="link" value="<?php echo $linkk; ?>?kw=<?php echo $_GET['kw']; ?>" />
                <input type="hidden" name="sft_title" value="<?php echo the_title(); ?>" />
    But the problem with that code is that essentially it is still the same url just added value behind it, wich wont do it for me. But when I remove the question mark it creates an url that doesnt exist thus i get not found error, which is logical.

    I need to somehow generate a random code for only thank you page post in wordpress.

    Im not at home with all the rewrite modules and etc, soo help is needed :)