Jump to content

Aureole

Members
  • Posts

    788
  • Joined

  • Last visited

    Never

Everything posted by Aureole

  1. If I type my IP then I get my router settings page, I'm guessing that's normal though and it won't apply to others?
  2. Ah well, anyone else have any ideas? It's just it'd be nice if the other people who are working on a project with me could access this too.
  3. Put " ' " around the things, e.g. case 'services':
  4. Here's a question, is it possible to let other people connect to my "localhost", I realize WAMP was designed as a development environment yada yada yada, but I'm just curious.
  5. Ah ha! I worked it out... I think. Say, someone should have told me about WAMP a long time ago, this is going to make my life much easier.
  6. Eh? I don't think you follow, I can't connect to PHP My Admin... well I couldn't, I worked it out. Anyway, now I have this: Does anyone know how I can "fix this security hole"?
  7. I installed WAMP and PHP My Admin won't work for some reason, I get an "Access denied" message.
  8. It's so PHP knows that it's a variable, if you did "$f" then it would think it was a string, putting it in curly braces tells PHP that it's a variable...
  9. Ok, I haven't changed anything in my script and the problems I were having all seem to have stopped...
  10. The script can be found here and the Website in question is Bungie.net. My script works fine (so far) but a few of the features that utilize ajax on their Website have just stopped working. I'm stumped, I really am.
  11. Thank you very much, will that work for all possible hexadecimal colour codes?
  12. I need a regular expression written in Javascript for A-Z/0-9/6 Characters, yes it's for hexa-decimal colour codes. If it's possible to do it with jQuery then that's great, if not then that's fine. I searched Google and I can't find anything, any help is very much appreciated.
  13. That is extremely picky if you don't mind me saying. Your way requires a few less lines of code, but it really wouldn't make that much of a difference. I know, you know this... but on a "pickiness" scale of 1-10, well you're off the scale.
  14. Wait, what the? Did you reply to the wrong topic or something. ??? Who are you talking to?
  15. If you want it so when the database is updated, the time-stamp changes to the current time-stamp then just use MYSQL's NOW() function.
  16. EDIT: Nevermind, I didn't read your post properly...
  17. I'm not really sure what's going on... try "\n" instead of "\r" maybe...
  18. <?php $current_timestamp = time(); $current_date = date( 'l jS M Y, g:i A', $current_timestamp ); echo( 'The current time-stamp is: ' . $current_timestamp . '. To put that into a human-readable format, the current date from afore-mentioned time-stamp is: ' . $current_date ); ?>
  19. It doesn't matter how you put something into the Database, a text area a text input or whatever... You can format the result though, if that's what you're asking - I'll show you. Go set prod_id #1 to "Red, Blue, Green" for color, then do this... <?php // Connect to Database here... $query = "SELECT * from `table` WHERE `prod_id` = '1'"; $result = mysql_query( $query ); $fetch = mysql_fetch_array( $result ); $id = $fetch['prod_id']; $color = explode( ',', $fetch['color'] ); echo( $id . ' is available in the following colors: '); echo( '<ul>' ); foreach( $color as $a => $b ) { echo( '<li><span style="color:' . strtolower( $b ) . ';">' . $b . '</span></li>' ); } echo( '<ul>' ); ?> I'm just showing you that you can play with the commar-seperated list in the Database and format it in different ways, once you've retrieved it. As for how you get it into the Database, it could be a lot of different ways and it wouldn't really matter... unless I misunderstood your question?
  20. <?php if ( !defined( 'WEB_ROOT' ) ) exit; ?> <p> </p> <div align="center"><img src="images/headerImagefront2-final.png" alt="Header Image"></div> <div align="center"> <a href="http://subicca.com/index.php>">Home</a> | <a href="http://subicca.com/index.php?page=services">Services</a> | <a href="http://subicca.com/index.php?page=about"> About </a> | <a href="http://subicca.com/index.php?page=contact">Contact </a>| <a href="http://subicca.com/index.php?page=shipping">Shipping</a> </div> <br /> <?php $home = 0; switch ( $_GET['page'] ) { case services: include('http://subicca.com/services.php'); break; case about: include('http://subicca.com/about.php'); break; case contact: include('http://subicca.com/contact.php'); break; case shipping: include('http://subicca.com/shipping.php'); break; default: $home = 1; break; } if( $home == 1 ) { // Code for your Homepage here... you could have just included a seperate file, within the switch statement where it says $home = 1; after "default:" but I put the code here... it will only be shown if they are NOT on the servers, about, contact or shipping page... ?> <p>Welcome to ma webz sight.</p> <?php } ?>
  21. Your host is no doubt upgrading MYSQL, or doing maintenance on the Server. I've had it before, the Host said he was working on something and it'd be back to normal later on.
  22. You want to use sessions... <?php session_start(); function logged_in() { if( isset( $_SESSION['logged_in'] ) ) return true; else return false; } ?> <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>Mail</title> <link rel="stylesheet" type="text/css" href="styles.css" /> <link rel="SHORTCUT ICON" href="/images/favicon.ico" type="image/x-icon"> </head> <body> <div id="main"> <div id="banner"><img src="images/banner.gif" width="700" height="102" alt="Mail" /></div> <div id="mainnav"> <table cellpadding="0" cellspacing="0" summary="Main navigation"><tr> <td><a href="http://www.mysite.com/">Home</a></td> <td><a href="http://www.mysite.com/about.php">About</a></td> <td><a href="http://www.mysite.com/screens.php">Screenshots</a></td> <td><a href="http://www.mysite.com/support.php"> Support </a></td> <td><?php if( logged_in() ) echo( $_SESSION['username'] . ' - <a href="logout.php">Logout</a>' ); else echo( 'Welcome Guest - <a href="login.php">Login</a>' ); ?></td> </tr></table></div> When someone logs in, if their Username and Password exists in the Database (so if their login is successful) then just set $_SESSION['logged_in'] = 1 and $_SESSION['username'] to whatever their Username is in the Database. This is an extremely basic example but you get the idea...
  23. That's what you get for coding non-stop for too long... thanks, though after I removed the print_r() it was still doing it twice. But now I've had a good sleep, I found out why straight away.
×
×
  • 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.