Jump to content

dark_mirage

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by dark_mirage

  1. Hmm ok sorry, what i want is a script that instead of saving a users image onto my server, it uploads it automatically to a photobucket account instead, overcoming the need to use up my webspace, and also using less of my monthly bandwidth when the images load in the gallery page. I hope that clears things up, thanks for the quick reply
  2. Im not sure if this is even possible with php, maybe more of a job for Python or something? I have an image gallery on my website. Would it be possible in any way, to have an image the a user uploads, go straight to an account on photobucket (or similar site) rather than being uploaded on my server? thanks for any help.
  3. thats perfect, thanks a lot
  4. Just a quick question, i have a profile page on my site, where members can submit their own info, for everyone else to view (think, facebook/myspace). However, at the moment, they are able to put html in their profiles, and it will be outputted in html on the profile page that everyone sees. Is there a way to stop this? and only have formatting such as line breaks, but no html tags? I think ive made this sound more complicated than it is to be honest, if nobody understands what i mean il try and rephrase Thanks for any help.
  5. hmm ok, how about: while($row = mysql_fetch_array($result)) { if $counter = $MyNumber { echo "<tr>"; $counter=0; } -rest of code- $counter += $counter; } so then, each time it creates a new row, the counter is reset again.
  6. I haven't really read your code, so i may be wrong, but couldn't you just use a counter in the while loop. something like: while($row = mysql_fetch_array($result)) { if $counter = $MyNumber { echo "<tr>" } -rest of code- $counter += $counter; }
  7. Well i don't know then sorry :-\ you'll have to wait for one of the guru's to check your post out, i doubt you'll have to wait long.
  8. Well in that case, try using the code i just said, replacing $MyNumber with your own variable obviously lol
  9. I don't totally understand what you mean, but i know you can format numbers with printf: printf ("%01.3f", $MyNumber); That should print to 3dp Haven't actually used this before though, so someone please correct my if i am wrong
  10. I guess i misunderstood what you were saying, i thought you were making a joke sorry
  11. xD a perfect example of 'stupid question, stupid answer'
  12. ah right, umm in that case, couldn't you link to a page which you do have control over, and then, on that page, run your script, and then automatically redirect to the page you want using the header function? there may be an easier way than this, but that's probably what i'd do.
  13. On the page that the link goes to, just have a script that adds the user's username to the table you want. I don't know if you wanted someone to supply a script aswell, or just an explenation. So theres the explanation, ask if you need help with the script.
  14. I think he has already got that far, i think what he is saying, is that even with that code, the file is still not being included, im out of ideas sorry.
  15. But you just said that the code is working ??? Stupid question... have u replaced 'www.yoursite.com' with your websites actual URL?
  16. Maybe an initial / would fix it, ie, <?PHP include "/english/SubPage/menu/menu.php"; ?> if not, how about trying the full url: <?PHP include "http://www.yoursite.com/english/SubPage/menu/menu.php"; ?>
  17. If Score is a field name, you need to change the line: $query = "SELECT * FROM $game WHERE console = '$console' AND diff = '$diff' AND song = '$song' ORDER BY 'Score'"; to $query = "SELECT * FROM $game WHERE console = '$console' AND diff = '$diff' AND song = '$song' ORDER BY Score DESC"; DESC is descending, if you want them ascending, it would be ASC i think, im pretty new to php but i think thats your problem. Hope it helps
  18. lol thanks for the quick replys. I decided to go with your solution Barand, being as it worked:p Thanks a lot.
  19. Hey guys, I have a script that allows the member to upload an image to our server. The script checks to see if the filename already exists on our server, and if so, displays a message saying so. Instead of this, i would prefer it to insert a random number after the filename, rather than rejecting it: if (file_exists("uploads/" . $_FILES["file"]["name"])) { insert number at end (but before the file extension) } Due to the fact the number needs to be added at the end of the filename, but before the file extension, i couldn't figure out how to do it. Any help will be much appreciated
  20. thanks for the quick replies both i think i see what your saying robot, so i need one table called 'uploads' for example, with the fields, 'user id', 'image url', 'viewed' and 'date submitted'. that shouldn't be too much of a problem, im gonna have to do my 'delete' script now though thanks a lot. ps. still open for any other easier suggestions if you have them -edit- on second thoughts, this is a much easier solution, its also gonna make my display and delete script a hell of a lot easier, thank you very much
  21. Hey guys, ive been creating a reasonably simple image upload site lately, the user can upload a maximum of ten images, the links to these images then get stored in a database. Each users' records consists of their username password etc, then the fields image1 - image10. I have a gallery page where users will be able to view other members' images, but on the main gallery page i would like there to be 2 small sections, 1 showing the 5 top viewed images, and 1 showing the 5 newest images. I really cant get my head around how to do this. I cant work out how to store how many times each image has been viewed, or which is the newest, and im also having trouble finding how to retrieve this info from the database. Thanks for any help.
  22. That was a great explanation, thanks a lot
  23. That works perfectly, thanks a lot for your help. I got the majority of the code from some tutorials, i tried not to just copy it straight off, becuse wheres the fun in that and i didnt really understand the mysql_num_rows($check) section, if it isnt too much trouble, would it be possible for you (or anyone) to give me a quick, simple explanation of mysql_num_rows() . Thanks
×
×
  • 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.