mobilekid Posted February 5, 2009 Share Posted February 5, 2009 This is my current code that works, it shows a tick box and a link saying I accept, when they have read my disclaimer and clicked I accept they go to the next page of my site, the tick box is just for show really would be nice to get it working but I aint that bothered, what is bothering me is I want to open 2 webpages instead of just 1, so when they click i agree it opens 2 webpages. <td class="windowbg3"><center><input type="checkbox" name="agree"'; if($agree == "on"){ echo ' checked';}echo '> <a href="index.php?action=home">I Accept</a></td> now how do I open another page and fix the tick box so it works? I have java script code but it never works and causes errors, but this code works on my forum page, but not my homepage. <a href="http://www.mysite.com/register.php?action=home" onclick="window.open ('http://ads1.pogads.com/show_ad.php?zid=12411','newwin');">click here to register</a> Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted February 5, 2009 Share Posted February 5, 2009 As far as the two webpages needed to be open I would assume you would have to do this via some Javascript. The tickboxes is fairly simple... if(isset($_POST['tickbox'])) { //do something } else { //do something else } Quote Link to comment Share on other sites More sharing options...
mobilekid Posted February 5, 2009 Author Share Posted February 5, 2009 ahhh, i see. could you try and use my code so I can just copy and paste it in, I am bad at php or javascript. its seems like everytime i add java it gives me an error. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/theman/public_html/disclaimer.php on line 21 Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted February 5, 2009 Share Posted February 5, 2009 sure paste your code... I am not that good at Javascript but I could try to lend a hand in PHP Quote Link to comment Share on other sites More sharing options...
mobilekid Posted February 5, 2009 Author Share Posted February 5, 2009 <? echo '<title>'.$site_title.' - Home</title> <table width="100%" cellspacing="1" cellpadding="4" border="0"> <tr valign="center"> <td class="windowbg" width="100%"><br><br> <center><table width="100%" cellspacing="1" cellpadding="4" border="0" class="border"> <tr> <td class="windowbg4"><center><img src="ico/doc1.gif"> <b>DISCLAIMER</b></td> </tr><tr> <td class="windowbg3"> <form action="disclaimerindex.php?action=login&sub=1" method="post"> <table width="100%" cellspacing="1" cellpadding="4" border="0"> <td class="windowbg" colspan="2"><br><br><center><font size="4" color="white"><b>DISCLAIMER</b></font></a><br><br>Before you enter this website, agree to this discalimer</center><br><br></td> <br></tr> </table> </form> </td> </tr><tr> <td class="windowbg3"><center><input type="checkbox" name="agree"'; if($agree == "on"){ echo ' checked';}echo '> <a href="index.php?action=home">I Agree</a></td> </tr </table>'; '<br></td> </tr> </table> </td> </tr><tr> <td class="footerbg"><center><a href="http://www.mysite.com/">Websites Designed and Developed by <b>me</b></a></center></td> </tr> </tr> <tr><tr><tr> </tr> <br><br><br> </br> </table>'; ?> Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted February 5, 2009 Share Posted February 5, 2009 is the form submitting to the same page? Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted February 5, 2009 Share Posted February 5, 2009 this is isn't tested... if(!isset($_POST['agree'])) { echo '<title>'.$site_title.' - Home</title> <table width="100%" cellspacing="1" cellpadding="4" border="0"> <tr valign="center"> <td class="windowbg" width="100%"><br><br> <center><table width="100%" cellspacing="1" cellpadding="4" border="0" class="border"> <tr> <td class="windowbg4"><center><img src="ico/doc1.gif"> <b>DISCLAIMER</b></td> </tr><tr> <td class="windowbg3"> <form action="disclaimerindex.php?action=login&sub=1" method="post"> <table width="100%" cellspacing="1" cellpadding="4" border="0"> <td class="windowbg" colspan="2"><br><br><center><font size="4" color="white"><b>DISCLAIMER</b></font></a><br><br>Before you enter this website, agree to this discalimer</center><br><br></td> <br></tr> </table> </form> </td> </tr><tr> <td class="windowbg3"><center>You must click I agree <input type="checkbox" name="agree"'; if($agree == "on"){ echo ' checked';}echo '> <a href="index.php?action=home">I Agree</a></td> </tr </table>'; '<br></td> </tr> </table> </td> </tr><tr> <td class="footerbg"><center><a href="http://www.mysite.com/">Websites Designed and Developed by <b>me</b></a></center></td> </tr> </tr> <tr><tr><tr> </tr> <br><br><br> </br> </table>'; } else { echo '<title>'.$site_title.' - Home</title> <table width="100%" cellspacing="1" cellpadding="4" border="0"> <tr valign="center"> <td class="windowbg" width="100%"><br><br> <center><table width="100%" cellspacing="1" cellpadding="4" border="0" class="border"> <tr> <td class="windowbg4"><center><img src="ico/doc1.gif"> <b>DISCLAIMER</b></td> </tr><tr> <td class="windowbg3"> <form action="disclaimerindex.php?action=login&sub=1" method="post"> <table width="100%" cellspacing="1" cellpadding="4" border="0"> <td class="windowbg" colspan="2"><br><br><center><font size="4" color="white"><b>DISCLAIMER</b></font></a><br><br>Before you enter this website, agree to this discalimer</center><br><br></td> <br></tr> </table> </form> </td> </tr><tr> <td class="windowbg3"><center><input type="checkbox" name="agree"'; if($agree == "on"){ echo ' checked';}echo '> <a href="index.php?action=home">I Agree</a></td> </tr </table>'; '<br></td> </tr> </table> </td> </tr><tr> <td class="footerbg"><center><a href="http://www.mysite.com/">Websites Designed and Developed by <b>me</b></a></center></td> </tr> </tr> <tr><tr><tr> </tr> <br><br><br> </br> </table>'; } Quote Link to comment Share on other sites More sharing options...
mobilekid Posted February 5, 2009 Author Share Posted February 5, 2009 i will; get this tested later today thanks for that mate, yeh my code is crappy, it links to the same page just the links work on the next which looks the same. Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted February 5, 2009 Share Posted February 5, 2009 sounds good bro... let us know how it turns out... like i said my code isn't tested but hopefully it will work like you need it to Quote Link to comment Share on other sites More sharing options...
mobilekid Posted February 5, 2009 Author Share Posted February 5, 2009 na dont seem to work but tbh i am not really bothered I really need to get a link to open 2 browsers instead of just one, i am so stuck! <td class="windowbg3"><center><input type="checkbox" name="agree"'; if($agree == "on"){ echo ' checked';}echo '> <a href="index.php?action=home">I Agree</a></td> 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.