Jump to content

[SOLVED] Parse error: syntax error, unexpected T_ELSEIF


onyxblack

Recommended Posts

Parse error: syntax error, unexpected T_ELSEIF in C:\wamp\www\work.php on line 18

 

My first time i've had to use time though the error is happening before it even gets that far, (will it let me do math like that?)

 

<?php

include('incl/login.conf.php');
mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS);
mysql_select_db(MYSQL_DB);

$ip = mysql_query("select ip FROM timetoclick WHERE ip='".$_SERVER['REMOTE_ADDR']."'");
while($fetchip = mysql_fetch_array( $ip ))
$time = mysql_query("select time FROM timetoclick WHERE ip='".$_SERVER['REMOTE_ADDR']."'");
while($fetchtime = mysql_fetch_array( $time ))


if ($fetchip['ip'] != $_SERVER['REMOTE_ADDR']);
{
mysql_query("INSERT INTO timetoclick (time, ip) VALUES ('".time()."', '".$_SERVER['REMOTE_ADDR']."')");
echo "New<br>";
}
elseif ($fetchtime['time']-43200>time());
{
echo "You have allreact been attacked. You can not be attacked by this person for X";
echo " more seconds.";
}
else ($fetchtime['time']-43200<time());
{
echo "New<br>";
mysql_query("INSERT INTO timetoclick (time, ip) VALUES ('".time()."', '".$_SERVER['REMOTE_ADDR']."')");
}
?>

heh, well still a noob at this...

 

Ok, so after removing those I'm getting,

Parse error: syntax error, unexpected '{' in C:\wamp\www\work.php on line 24

 

And after removing the '{' I'm getting,

Parse error: syntax error, unexpected T_STRING in C:\wamp\www\work.php on line 25

 

>.<

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.