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']."')");
}
?>

Link to comment
Share on other sites

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

 

>.<

 

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.