Jump to content

mworkman

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mworkman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am trying to use the Auth component. It say that is uses sha1 by default. So I saved my password using sha1 function. When I tryed to login with Auth it came up with a different value when comparing the values. How can I fix this?
  2. anyone know a good tutorial making code for handling logging people in and out?
  3. you move function should probably contain something like this: $this->board_value[$from]=''; $this->board_value[$to]="S";
  4. Wouldn't that do the opposite. The problem is the variable is staying after 60 seconds, not that it is disappearing after 60 seconds.
  5. I'm not sure I understand. How would I change the code so the variable would no longer exist after 60 seconds?
  6. I am trying to get sessions to work right Here are my settings: session.gc_maxlifetime = 60 session.gc_probability = 1 session.gc_divisor = 1 session.cookie_lifetime = 0 (when browser closes) So say I have two php files: php1.php session_start(); $_SESSION['var1'] = 'var1'; php2.php session_start(); echo $_SESSION['var1']. '<br>'; So if I go to php1 it will set the variable and then I can go to php2 and it will echo the variable. This works. But if I don't do anything and then go back to php2 after 60 seconds the variable should no longer exist. This part is not working. What do I need to change to get it to work?
  7. I am trying to load an xml file but I can't seem to find the location to load it. Here is the location of the xml file: C:\inetpub\wwwroot\php\webphp.xml Here is the location of the file trying to load the xml: C:\inetpub\wwwroot\php\gui\guiindex.php What location would I put in here: $xml = new SimpleXMLElement("XMLFILELOCATION", NULL, true);
  8. I didn't notice that. It was the problem.
  9. I got it fixed. For some reason it didn't like me using: public function getType() { return $this->type; } I change it to: public function getScheduleType() { return $this->type; } and it works.
  10. I have a working server and other php files are working. I just edit and save the code in eclipse and then view it with firefox. If it doesn't work I get an IIS error. Is there any way of doing it that gives more information about what is wrong? Now even if I comment out the last 2 lines(leaving just the class) it wont work.
  11. Here is my code: <?php class ScheduleRecord { private $month; private $day; private $year; private $hour; private $minute; private $type; private $employeeNumber; public function __construct($employeeNumber, $type, $month, $day, $year, $hour, $minute) { $this->employeeNumber = $employeeNumber; $this->type = $type; $this->month = $month; $this->day = $day; $this->year = $year; $this->hour = $hour; $this->minute = $minute; } public function getType() { return $this->type; } public function getEmployeeNumber() { return $this->employeeNumber; } public function getMonth() { return $this->month; } public function getDay() { return $this->day; } public function getYear() { return $this->year; } public function getHour() { return $this->hour; } public function getMinute() { return $this->minute; } public function getType() { return $this->type; } } $shcRec = new ScheduleRecord(3, "DayIn", 04, 04, 04, 04, 04); echo $shcRec ->getEmployeeNumber(); ?> error: The page cannot be displayed because an internal server error has occurred. the last line seems to be the problem.
  12. I have having a problem getting a mysql query to work. If I just use mysql_query it looks like this and works fine: INSERT INTO schedule (schedule_pk, schedule_month, schedule_day, schedule_year, schedule_hour, schedule_minute, schedule_type, employeenumber) VALUES ( NULL, 10, 10, 1999, 12, 6, 'DayIn', 3); If I put it through mysql_real_escape_string it turns it to this and does not work when I put it into mysql_query: INSERT INTO schedule (schedule_pk, schedule_month, schedule_day, schedule_year, schedule_hour, schedule_minute, schedule_type, employeenumber) VALUES ( NULL, 10, 10, 1999, 12, 6, \'DayIn\', 3); aka: $query = "INSERT INTO...." mysql_query($query); that works, but: $query = "INSERT INTO...." $sqlQuery = mysql_real_escape_string($query, $con); mysql_query($sqlQuery); results in the error. mysql_query($query); The error is: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'DayIn\', 3)' at line 1
×
×
  • 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.