Jump to content

strange problem with .php


mobilekid

Recommended Posts

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> 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

<?

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>';

?>

Link to comment
Share on other sites

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>';
}

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.