Jump to content

toasty525

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

toasty525's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, is it posible to nest simple java script in a PHP IF statment for example i have the following code: if ($row == 0) { ?> <SCRIPT language="JavaScript"> alert('Sorry not this time, Please try again !'); </SCRIPT> <? } else { echo $row['prize']; } When $row = 0 its meant to show an alert box but it dosnt work.
  2. Hi, i am trying to log the users ip when they visit one of my sites the setup is as follows: i have one page on a site 1 that has the code: <?PHP $ip=$_SERVER['REMOTE_ADDR']; echo $ip; ?> and another page on site 2 that has the code: <?PHP include('http://site1.com/gettest.php'); ?> When a user visits site 2 i want site 1 to log there IP address but instead it only logs the IP address of the host for site 2. Any help would be great thanks
×
×
  • 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.