littleolemedesigns Posted May 20, 2008 Share Posted May 20, 2008 I'm hoping someone can help me... I have a php script that does a splash page on http://www.loveyoudivine.com The splash page works like it should, except for one thing, whenever we try to advertise a particular product in the store, and we link directly to the product, the person that clicks the link goes to the store and hits the splash page, which is good, but on clicking Enter, they go directly to the home page, which is how it's programmed right this moment... What I need help trying to figure it out is how to make it where when they click Enter they get forwarded into the store to the item they were trying to get to, not just into the store to the home page. Does anyone have any idea how to make this happen? Quote Link to comment Share on other sites More sharing options...
phpzone Posted May 20, 2008 Share Posted May 20, 2008 Well you link to the a product is like http://www.loveyoudivine.com/index.php?main_page=document_product_info&cPath=22_4&products_id=90 So you need to have the cPath and product id on your advert link, check for the presence of paramseters on the loading page and create your 'Enter' link with the correct parameters Quote Link to comment Share on other sites More sharing options...
littleolemedesigns Posted May 20, 2008 Author Share Posted May 20, 2008 We would definitely be putting the full URL to the product in any adverts we do... what I can't figure out or find any information about is how to make the Enter button where it gets the URL they were trying to get to and then on clicking Enter sends them to it. Php can do this I think, I just don't know how. I'm still really really new to php programming. Quote Link to comment Share on other sites More sharing options...
Fearpig Posted May 20, 2008 Share Posted May 20, 2008 You could set your adverts to link something like: www.yoursite.com/index.php?page=1234ABC&product=5678DEF then have your spalsh page grab the variables and pass it on as either a hidden field or insert the variable as part of the target URL for the Enter button. Here's roughly the code for using the variables in the URL..... <?php //---your splash page---- $page = $_GET['page']; $product = $_GET['product']; $page_url = $Page . '.php?product=' . $product ; echo "<form action='$page_url' method='POST'><input type='submit' name='Submit' value='Enter'></form>"; ?> there are probably a few typos but the enter button should then take you to the page: 1234ABC.php?product=5678DEF Let me know if that helps! Quote Link to comment Share on other sites More sharing options...
littleolemedesigns Posted May 25, 2008 Author Share Posted May 25, 2008 Thank-You so much for helping me with this... I'm sorry it's taken so long to get back in touch with you.. I've been looking this over that you suggest.. and looking things up online... and this is just going 100% over my head... :-\ What I've got now: Index page of the store: http://www.loveyoudivine.com with this code at the top of the page: <?PHP if (!$_COOKIE["ageauth"]) {header("Location: splash.php");} ?> Splash page: http://www.loveyoudivine.com/splash.php with this code at the top of the page: <?PHP setcookie("ageauth", "yes" , 0); ?> Does that code you suggest go at the top of the page like these do, or is it acting as the button?? Sorry for the newbie questions... I keep trying to figure out php.. and it's just not making sense to me like html, css, and such did. I'm very confused. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.