Jump to content

Recommended Posts

Hey there, I am making a PSP Security Website, I have this Code, but I get an unexpected T_VARIABLE ERROR on line 43. here is the full code


[code]<?php
//MEMBER SCREEN
include '../connect.php';
session_start();
?>
<center>



</center><br><br>
<link rel="stylesheet" href="../style.css" type="text/css">

<?php
$username=$_GET['user'];
   
    $userstats="SELECT * from users where username='$username'";
    $userstats2=mysql_query($userstats) or die("Could not get user stats");
    $userstats3=mysql_fetch_array($userstats2);
    $name=$userstats3['name'];
$ip = $_SERVER['REMOTE_ADDR'];

    $ip1=$userstats3['ip1'];
    $ip2=$userstats3['ip2'];
    $ip3=$userstats3['ip3'];
    $ip4=$userstats3['ip4'];
    $ip5=$userstats3['ip5'];
$date1=$userstats3['date1'];
$date2=$userstats3['date2'];
$date3=$userstats3['date3'];
$date4=$userstats3['date4'];
$date5=$userstats3['date5'];
$ip5=$ip4;
$ip4=$ip3;
$ip3=$ip2;
$ip2=$ip1;
$ip1=$ip;
$date5=$date4;
$date4=$date3;
$date3=$date2;
$date2=$date1;
$date1=date("d F Y")

      $SQL = "UPDATE users set ip1='$ip1',date1='$date1',ip2='$ip2',date2='$date2',ip3='$ip3',date3='$date3',ip4='$ip4',date4='$sate4',ip5='$ip5',date5='$date5' where username='$username'";
mysql_query($SQL) or die ("Sorry, but the service in unnavailable at the moment!")
?>[/code]

I don't understand what is wrong![code][/code]
Link to comment
https://forums.phpfreaks.com/topic/30215-help-with-my-code/
Share on other sites

Missing a semi-colon on the first and third lines of this three line set:

[code]<?php
$date1=date("d F Y")
$SQL = "UPDATE users set ip1='$ip1',date1='$date1',ip2='$ip2',date2='$date2',ip3='$ip3',date3='$date3',ip4='$ip4',date4='$sate4',ip5='$ip5',date5='$date5' where username='$username'";
mysql_query($SQL) or die ("Sorry, but the service in unnavailable at the moment!")
?>[/code]

Ken
Link to comment
https://forums.phpfreaks.com/topic/30215-help-with-my-code/#findComment-138941
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.