Jump to content

MrAdam

Members
  • Posts

    489
  • Joined

  • Last visited

Everything posted by MrAdam

  1. haha. i had very similar problems installing them ! My friend reccomended i uninstalled them and used xampp. It installs everything in one and has it's own control panel. Far better I thought!Also i've found that it doesn't slow my computer down at all - and im using a pretty.. poo.. computer.Good luck !
  2. In your insert query, you didn not include the field names: mysql_query("INSERT INTO users-online (field1,field2) VALUES ('".$random."', '".$_SERVER['REMOTE_ADDR']."')"); Rename field1 and field2 obviouslly. I assume you have connected to the internet earlier in your script?
  3. Before a freind reccomended me xampp, i was messing round following a tutorial to try and install apache, php and mysql all sperate, then get them all working with each other - and i was completely lost. Xampp is really simple, just download it and everything is sorted out in one simple installation. There are a few extra things available with it, like "Mercury" and "FileZilla", but i had no idea what they were, so had no use for them.Good luck !
  4. you could create a sort of php image template file. when you open the window, open it with a url like:"image.php?img=images/img1.jpg"that way there will only be 1 file for all the images, and you could still use the auto resize script on that webpage.a script i made not so long ago to do almost the same thing: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><title>Image: <?php print $_GET['img']; ?></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">body { margin: 0px;}</style></head><body><img src="<?php print $_GET['img']; ?>" alt="" /></body></html> ...it's fairly basic, but does the job! Just remember you need to have PHP enabled on your webserver/host - and save it as a ".php" file.Adammm
  5. quoting myself, in the code you supplied, session_start(); was written after some HTML .. and if errors are off .. you won't realise it's not actually starting the session.
  6. MrAdam

    At my witts end

    oh right, just that in the url, if you have "?var1=Hello&var2=" it will recognise var2 as not set. i pressumed it would be the same in other circumstances too.
  7. http://www.php-mysql-tutorial.com/php-mysql-upload.php
  8. <?php$con = mysql_connect("host", "user", "pass") or die("Could not connect to database because ".mysql_error());if(!mysql_select_db("database",$con)) die("Could not connect to database because ".mysql_error();$query = mysql("SELECT * FROM table ORDER BY unique_field DESC LIMIT 10");while ($rows=mysql_fetch_array($query)) {print $rows['field_name'].'<br />'.$rows['another_field'].'<br /><br />';}?>i've not tested it, but it should work. Just replace host, user, pass and database to connect. Then obviouslly change the values in the query.
  9. however, there are ways of making it secure by making it so hard to understand, take a look at this script.- that was the first I found, though I don't know if it works properly or w/e - i put in some sample code and it looks damn dodgey!
  10. haha. i don't even think that's right - it will be looking for braces to know when the if ends, unless you only have one statement and therefore do not need braces.
  11. MrAdam

    problems with date.

    Just let me get it straight, you are setting an event which is yet to happen, by a date & time? then calculating the time until that event?You see, you have: - futureand then the text your printing says: - past
  12. MrAdam

    At my witts end

    haha okay! - Though i would have thought in that situation it would be recognised as not set. Meh!
  13. you want to install PHP onto your computer? (I'm not sure what it was you meant).if so, I used: xampp. real simple to install and use.
  14. MrAdam

    At my witts end

    could be something simple; do you have "session_start();" before anything is printed to the page ?
  15. 'secure files' would probably be the only way of doing it... (Google it )
  16. window.print() should print the current page ..
  17. MrAdam

    how?

    I think he means like forums have: "1 User(s) are reading this topic..." sort of thing, if so stone, follow justsomeguy's advice...
  18. MrAdam

    Login system

    I'd use sessions for while they are logged in, and cookies to remember them.
  19. session_start(); must be sent before anything is outputted to the page..
  20. as far as i know you can't use ";" to seperate them. There may be a way of allowing it i'm not aware of though. Where did you see it being used? I've seen it being used on .cgi files before?
  21. that counter was very useful 'justsomeguy' - cheers. yeah, I kept increasingly adding js as I added more to the basic website. Mainly it's just an image in place of a submit button. Thanks for the feedback!
  22. you could use php ..when setting the frames, your banner thing across the top could contain a link that is generated using PHP.for example:"toppage.php?url=http://www.google.co.uk"then in between the link have like: <a href="<?php print $_GET['url']; ?>" target="_top">Remove this frame</a> <?php => opens the php scriptprint => prints text to the page$_GET['url']; => the value of the 'url' parameter within the url?> => closes the php scriptsorry if you think i was being too condescending there.
  23. you can do that in HTML, just set the target attribute of your link to "_top" ..
  24. MrAdam

    BBCodes

    quite simple really. Any tags you don't want removing (so anything required for bbcode) you just add to the function parameter: $tekst = strip_tags($tekst, '<p>,<span>');
×
×
  • Create New...