Jump to content

Aureole

Members
  • Posts

    788
  • Joined

  • Last visited

    Never

Everything posted by Aureole

  1. I just found this on PHP.net: That's interesting to note... also it isn't deprecated.
  2. I didn't say remove it, I said it's causing the problem... setcookie("currentcustomer", $customer_id, time()+3600*24, '/', 'www.jcs5325.aisites.com'; That's with it removed, do you see anything wrong? Maybe a mising ")" before the semi-colon? The error even tells you the problem... unexpected ';'... that means there's something missing before the semi-colon. Geez.
  3. setcookie("currentcustomer", $customer_id, time()+3600*24), '/', 'www.jcs5325.aisites.com'; The part in red is your problem.
  4. I thought it was some kind of tag that you can put in your pages... kind of like meta description/keyword tags. Ah well.
  5. Normally when you look at search results on Google you'll see something like: However sometimes you'll see things like this: How is that achieved?
  6. Extremely well thought-out and interesting response, I enjoyed reading it. I've seen COMMERCIAL SOFTWARE, that has such things. Little hidden easter eggs and whatnot... so developers that are working on huge projects that people PAY for do it sometimes... so it's not just me.
  7. When I click on the a element with an id of toggle_menu_1, it just toggles the div with an id of menu_1... simple enough. Now what I'd like to do, is remember whether or not the div was showing. If the user clicks on it to hide it, then I'd like to set a cookie, so that next time they load the page it will still be hidden. Should they click on it again (to show it) the cookie should be erased (or changed) so that next time they load the page it will still show. I found a Cookie Plugin for jQuery if that helps. Here's my Javascript at the moment: $('#toggle_menu_1').click(function() { $('#menu_1').slideToggle(300); return false; } ); Then the HTML looks like this...: <div class="menu_title"><a href="#" id="toggle_menu_1" class="cat_title_a">Click To Toggle</a></div> <div id="menu_1" class="menu_inner"> <div class="menu_item">Item #1</div> <div class="menu_item">Item #2</div> <div class="menu_item">Item #3</div> </div> I've tried experimenting with it myself, I got it to set the cookie and check if it was there but it just wouldn't work at all. Thanks a lot.
  8. Sometimes when I'm coding, I get a little bored... so I might make my variables have funny names, or make my comments witty. Not just for the sake of it, just to make coding a little more fun. Sometimes I'll add little easter eggs into my programs too, I have a page that handles all the errors, but if an error isn't specified it says something like... ... I don't do it much... otherwise I'd just be wasting time. I'm just wondering if other people do similar things to make coding a little more fun now and again?
  9. I'd do this... <?php $id = ( isset( $_GET['id'] ) && is_numeric( $_GET['id'] ) && !empty( $_GET['id'] ) ) ? $_GET['id'] : 1; ?>
  10. I worked it out, it was simpler than I thought. <?php $page = ( isset( $_GET['page'] ) && ( $_GET['page'] ) ) ? $_GET['page'] : 'home'; $input = array ( 'home' => array( 'Home', 'website', 'public', 'index'), 'forum' => array( 'Forum Index, 'forum', 'forum', 'index'), 'contact' => array( 'Contact', 'website', 'public', 'contact') ); if( array_key_exists( $act, $input ) ) { require_once( ROOT_PATH . 'sources/' . $input[$act][2] . '/' . $input[$act][3] . '.' . $equinox->vars['php_ext'] ); $page_title = $input[$act][0]; $nav_current = $input[$act][1]; include( ROOT_PATH . 'sources/inc/header.' . $equinox->vars['php_ext'] ); echo( $page_html ); include( ROOT_PATH . 'sources/inc/footer.' . $equinox->vars['php_ext'] ); } ?>
  11. Thanks for your suggests laffin and kenrbrsn but I already know how to do it both of those ways. $input = array ( 'home' => array( 'Home', 'something', 'something', 'index.php'), 'contact' => array( 'Contact', 'something', 'something', 'contact.php') ); if( in_array( $_GET['file'], $input ) ) { $input[$_GET['file']] } If the $_GET['page'] is home, I want to include index.php and I want to be able to access those other parts of the array ( array( 'Home', 'something', 'something', 'index.php') ), if it's contact then the same... I know there are simple workarounds to tricky ideas, but it'd be nice to know how to do this anyway..
  12. Does anyone have any ideas on how I could approach this? Thanks.
  13. You make a point, I'll be sure to keep that in mind.
  14. Could you elaborate? I don't understand the question.
  15. Because there will be more things in the array (around 4 or 5 in total for each) than I put in my example, I just only put 2 to make it easier for people to try and help.
  16. I want to have something like this: <?php $input = array ( 'home' => array( 'Home', 'index.php'), 'contact' => array( 'Contact', 'contact.php') ); if( in_array( $_GET['file'], $input ) ) { // Include the file here... } ?> But I'm not sure how to go about it, any ideas?
  17. I'm aware of http://portforward.com/, but where do I go after I select my Router make and model? I can't find an option for WAMP.
  18. I think I found it, I have a screen up and I have the following options: Rule Flavour: NAT or DMZ Rule ID: Rule Protocol: ANY, TCP, UDP, ICMP or any number between 1-255 Lan IP Address: Destination Port: Local Port: For Destination and Local port you can add a port number, plus choose from one of the following for each: Any other port, ECHO, DISCHARD, CHARGEN, FTP, TELNET, SMTP, DNS, BOOTP, TFTP, HTTP, POP3 or SNMP. HELP!
  19. Learn something new everyday, thanks.
  20. I've started developing on WAMP but I have a problem... I have something like this... <?php if( DEV_MODE == 1 ) { define( 'ROOT_PATH', 'C:\\wamp\equinox\' ); } else { define( 'ROOT_PATH', '/home/......./public_html/equinox/' ); } ?> I'm getting the error: Of course, that's because of the back slashes... so how do I overcome this problem?
  21. Damn edit button disappeared... I gave someone my IP and they said it says "unable to connect". The server IS online and Apache, PHP and MYSQL are all running.
×
×
  • 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.