Jump to content

airjunkie2000

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by airjunkie2000

  1. Here is a sam0ple of the if statements. I want to filter it if it "contains" the word or phrase, not if it equals it... ////////////// if(document.form1.name.value == "www") { alert("No Spamming Please"); document.form1.name.focus(); return false; } if(document.form1.comment.value == "www") { alert("No Spamming Please"); document.form1.comment.focus(); return false; } ///////////////// see this filters out "www" if you type that, but not www.spamsite.com, any suggestions? Thank you
  2. home grown, really basic... I have figured out how to block an exact word, for instance if I just type "www" it will block it, but if I type "www.fjkgsdfjkgs" it will not
  3. Ya know how you can use the if function to weed out strings that contain something by using "==". My problem is that I need to weed things out that contain a certain few lters in a certain order. Whats going on id people are spamming the hell out of my comment adding script and I need to block all comments and names that contain www, http, .com, or .net Any help is appreciated Thanks
  4. The img in css with a class and text decoration no is working ok! Thanks a lot
  5. Thank you for the input. I want to try the text decoration. I can use that on the img tag also in css right? If this doens't work I will post the url of the page, Thanks
  6. Hello, I have a question. At first I thought that I could easily make this happen, but it turned out to be more difficult than i thought. I am simply trying to make all img borders to be a certain color in css. So I found the way you put img with attributes in css, and even do the hover highlight. The problem is that the images bottom borders do not change, but the right, left sides and the top do. The bottoms stay the typical IE link blue? Does anyone have any snipets or solutions for this in css? Thanks for your time
  7. Just a follow up, I changed the javascript to mysql, and cut 4 seconds off my initially load time as alexa reports it. Deffinitely an improvement. Thanks again
  8. Thanks a lot for the help. I will move forward building the mysql query
  9. Thanks for the info ok, so when you say 5000 queries do you mean 5000 mysql strings that do the query or do you mean query a databse with 5000 entries. Sorry Im new to Mysql... I have 8 randomizing javascripts running and I want to put in 1 mysql query in place instead. That will amek the total queries on that one page equal to 7. I guess I don't forsee a problem
  10. Hello, Im working on some randomizing scripts to display random data. I can either use a javascript with each line being one of the entries and randomly choose and display them or I can put the entries into mysal and selct random from a database. Which is better for speed )which will slow the site down less). Which creates less load on the server? Also in general how many Mysql queries per page is it safe to have if you are concerned with page loading speed? Thanks for any input
  11. Hi guys/gals, I have a few questions regarding java game developement. Basically I have been looking around for a developer to help me with a project I have. (I know Im prob not suposed to try to do biz deals in the TCH forums) but really I am looking for some advice as to how long of a time frame I should expect for a certain project I have outlined. If anyone can help me with it please PM me or post back. Thanks
  12. Turns out you were right about the rand statement, it was retuning a media_id that did not exist in the database, so instead I just user ORDER BY RAND() and then displayed 3 results, thanks both of you.
  13. Thanks for the input I will try both these suggestions
  14. Im sure Im missing something obvious here, but its still not working correct. Im trying to display 3 random images from a database... I don't get any coding errors, parse errors, but it displays nothing? Here's the code: <?php $result = mysql_query("SELECT media_id, thumbnail, file, path FROM media_info WHERE media_id = RAND() LIMIT 3") or die(mysql_error()); while($row=mysql_fetch_array($result)) { ?> <a href="<?=$row[path];?>?media_id=<?=$row[media_id];?>"><img src="<?=$row['thumbnail']?>" alt="" width="100" height="80"></a></td> <br> <? } ?> Thanks for any help
  15. Im slowly working through this and I have another question. I am wondering about how to create paging? Like how display say 12 items on a page and then move to the next 12, ect... I have this query set up to display to a limit of 400 so I imagine I will have to make the limit a variable? Here's the query I have now... $result = mysql_query("SELECT media_info.media_id, media_type, thumbnail, description, posted, views, media_info.name, file, path, count(comments) as no_of_comments FROM media_info LEFT JOIN comments ON comments.media_id = media_info.media_id GROUP BY media_info.media_id, media_type, thumbnail, description Order by media_id DESC LIMIT 0, 400;") or die(mysql_error()); Can someone give me some tips on how to start and what is involved? Thanks, any help is appreciated.
  16. Thanks for the info, I guess I should ask one more question (probably a dumb question). If I do use the int and insert a time then can I still order the database by date, like display newest first and stuff?
  17. Thanks for the reply. I want to try and explain better what Im trying to do. I have a database that stores different pictures for a website. One of the fields in the database is called "posted" and it is of type datetime. When I enter pictures into the database I use this string: mysql_query("INSERT INTO mydatabase (media_type, description, thumbnail, name, file, path) VALUES('entry1', 'entry2', 'entry3', 'entry4', 'entry5', 'entry6' ) ") or die(mysql_error()); Now there is another field in the database, its in between the thumbnail and name fields and its called "posted" and is type datetime, when I don't enter anything to it I get 0000-00-00 00:00:00 for a value. What I want here is the date and time the entry was made to the database? I heard I should use getdate() and you say to use time(). Basically what could I make this string look like to get the date and time entered into the "posted" field? Thank you very much
  18. Hello, I am using a database for some of the items on my website. To insert new itmes I just to a query insert and put the fields and the data to go into the fields... One of my fields is for the date and time of the entry, I was told that there is a getdate() function that can be used when I do the query insert and that this will put the date and time the item was inserted in the database? Can someone please show me the string of cade or help me better understand where to place the getdate() in my insert query? Thanks
  19. I have been searching around the internet with little luck, probably cause Im not explaining what I want properly. In my page I need to somehow "echo" or display the url of the current page. Is there a line of code in html or php to get and display or insert the current url? Thanks
  20. So the "webmail" accounts we have here at TCH are pop3.. So what is the mail server url? What is the syntax/format. I am also trying to get my yahoo account to recieve emails from my webmail accounts. I have the upgraded yahoo account that alows this, just not sure of the details above. New to the whole we world.. Thanks
  21. Can I host more than one site on a dedicated server plan? Thanks
  22. Hi Carbonize, thanks for the reply. Basically all I need to do is have a small script with one input box (browse button) and one submit button. Let the user browse his/her PC hard disk for items to upload and all the uploads are put in one folder. I would like to limit the files to .jpg, .gif, .bmp, .wmv, .mpeg, .mpg, .avi (video and picture), but limiting the file types is not necessary. I have a script that does the simple upload to one folder, the problem is that someone got in there and made more directory structure off the folder and uploaded an executable file. Im not sure how to keep people in the one dedicated folder and keep them from hacking me, thats the issue. Any ideas, please let me know. Thanks
  23. Hello, At one point in time I had a small php upload script on my site for users to upload files (images and movies). Someone got into the folder and created sub folders off of it. Basically I got hacked. I am looking for a way to have a very simple upload script that dumps all the files into one folder and is safe... Any ideas, I have seached the forums and came up with a lot of big freebie scripts, but thats not what I need. Thanks
×
×
  • Create New...