Jump to content

DrRobot

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DrRobot's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I guess this is probably the reason that the $_COOKIE[$cName] isn't working. Also, I have error_reporting(E_ALL); at the top of my file, I guess it's not working? BTW, I'm using WAMP.
  2. Hello, I'm having an issue with using a php variable (of the current page url) as a cookies name. Here's an example of what I'm trying to do: $directory = "/main/index.php?id=7"; $cName = "path_".$directory; if(isset($_COOKIE[$cName])){ echo "Do something NOW!!!"; setcookie($cName, '1', mktime(23,59,59)); } echoing the isset check doesn't return anything, no 0, no 1. I can print_r $_COOKIE; and it shows the cookie exists, I just can't check if it exists with what I'm doing here. From what I've learned is that the cookie name is something like: "testing" it works just fine, but if it's that $cName variable it doesn't work. Any ideas?
  3. So i plugged in the full path and tested it with the display_errors in the php.ini and I got an error. After some research I had to include allow_url_fopen in my php.ini. I then tested it and got string(0) "". So any other ideas?
  4. Hey, I'm trying to open a .php file and read a comment block that is in the beginning of the file. I'm having some trouble in that nothing is being echoed out. Here is the reading file: <?php $fb = fopen("tepl.php", "r"); $data = fread($fb, 8192); fclose($fb); var_dump($data); ?> here is the file (tepl.php) being read: <?php /* Name: Test Plugin 1 URI: http://www.theorangeday.com/plugintest/ Description: This is just a test plugin because I need to test how this thing is going to work overall. Author: Thomas Francis Author URI: http://www.theorangeday.com/ Version: 0.1 */ function test_plugin(){ echo "we loaded the test plug"; } ?> the var_dump returns string(321) " " What's wrong here?
  5. YES!! thank you!! it works perfectly now! thank you very much!
  6. no, i have my functions in classes. and i want to know how you would go about updating the current amount of replies in a thread, such as this one, like when you are looking at the OOP help thread it says 2 replies next to my thread (now three) i have a function that is supposed to update it, but it doesn't... code: function updateTopicTime($id){ $day = date("Y-m-d"); $time = date("g:i:s A"); $q = "UPDATE ".TBL_TOPICS." SET time = '$time', date = '$day', threads += '1' WHERE fid = '$id'"; mysql_query($q); } function addNewForumThread($fid, $topic, $uname, $text){ $day = date("Y-m-d"); $time = date("g:i:s A"); $this->updateTopicTime($fid); $q = "INSERT INTO ".TBL_THREADS." VALUES ('$fid', '', '$topic', '$uname', '$text', '$day', '$time', '')"; mysql_query($q, $this->connection); }
  7. ok, so i got a user system awhile ago on the web and i've been editing it extremely, now i am making a forum, and i got it so it will display the topics, and the threads created, but i can't get it to update the replies in each topic and thread. how would i do this?
×
×
  • 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.