Jump to content

mikesta707

Staff Alumni
  • Posts

    2,965
  • Joined

  • Last visited

Everything posted by mikesta707

  1. I can't see much wrong. it looks like you have an extra endif at the end of the page (maybe, but maybe not). I didn't really even see anythign wrong with the links... they looked exactly the same. What is the problem you are having exactly?
  2. I see no difference... post the code maybe
  3. tabs for sure. ctrl+T ftw, but i've always prefered keyboard shortcuts over everything
  4. Ok, I kind of understand what they are. Cross site scripting attacks, and they involve malicious code and yada yada yada But at the same time, I have no clue what XSS attacks are. Anyone willing to explain them? or show me a site that explains them pretty well? you can't yada yada sex...
  5. I made a very simple Image board from scratch once. Kinda copied the wakaba format, but it was actually a lot easier than I thought it would be. Like Nightslyr said, start simple, but I would suggest that you code this as smartly as you can, so when you want to add new features, you don't have to rewrite a bunch of different stuff. good luck with the admin control panel =P
  6. I would go with mod rewrite, but anyone can just view source the page, and see the source of the iframe
  7. I see nothing glaringly terrible, except that you are using short php tags. Also, you should sanitize your input.
  8. if you want the IP address of the client just use $ip = $_SERVER['REMOTE_ADDR'];
  9. ternary operator $var = (boolean expression) ? value if true : value if false;
  10. if ($pos !== false || $pos2 !== false){
  11. you need to tell us what Database class you are using. or at least show the searchquery method. Without that information, any advice we could give would be shots in the dark. by the way you only need to use backticks when you are using reserved words in mysql
  12. you can get a timestamp with the time() function. $timeStart = time(); When you submit the form on the processing page you could have $timeEnd = time(); obviously you will need to sent the start time to the next page (through a hidden field, a session, save it to a DB, etc.)
  13. i believe that it won't be sent. (IE you can check if its set via isset and that will tell you if it was sent or not) but I could be wrong.
  14. If you are going to use cookies, be careful, because cookies are trivial to change. For a log in, I would suggest sessions, but for their login expiring, you could use a cookie (and obviously just refresh the cookie every time they go to a new page, or do something)
  15. its been deprecated as of php 5.3.0 i believe. I don't think there is a stable release of PHP 6.0 besides the snapshot
  16. don't you want a non encrypted id? and you never define $encrypted_id you can probably just do this $query = mysql_query("SELECT * FROM members WHERE id = '".$_SESSION['username']."'") and you cant do this $query = mysql_query("SELECT * FROM members WHERE id = '". $encrypted_id ."'"); $result= mysql_query ($query) or die ('id and session data dont match.'); you are trying to do a mysql_query with a mysql_query resource. either do this $query = ("SELECT * FROM members WHERE id = '". $encrypted_id ."'"; $result= mysql_query ($query) or die ('id and session data dont match.'); or this $query = mysql_query("SELECT * FROM members WHERE id = '". $encrypted_id ."'") or die("error message");
  17. Twitter has an API for this specifically. check that out
  18. well you send the score or rank via ajax, and store it into a database. something like $score = $_GET['score']; $query = mysql_query("INSERT INTO score (rank) VALUES ($score)"); But i don't know you table structure so I can't be of much more help
  19. if you are taking the current() next() method, doing the following should work while($value = current($errors)) { // Specifically with the following line, how would I complete the $value within a while, or must I just do it like $value["0"]; which will then self populate the rest as the while is running? if(empty($value) { echo "do something ..."; } next($errors); } this is because you store the current value of the array into the variable $value. Basically, all that current does is return whichever element the internal array pointer is pointing at (read the php manual for more info on how this works) and next changes the internal pointer to the next element
  20. well more like <?php session_start(); ?> but yes
  21. Neither of those... put session_start() at the top of your page
  22. firstly, you should put quotes around the flag. Not required, but that is probably drawing a Notice message. secondly, look at what the error says "fopen cannot open directory" what do you think that means? you will need to make that directory before you add files to it. are you sure that directory exists?
  23. you can't send headers before any output. the error shows where the output starts (in your case line 7) Cannot send session cookie - headers already sent by (output started at /home3/nyhungry/public_html/includes/header.php:7) put your php code that sends the header at the top of the page
  24. the enctype has to be multipart/form-data for file uploads to work. I don't quite get what your problem is though. do you have any code that is giving you problems? you said you are using Curl. Why are you trying to use Curl. is the upload happening on your server or someone else's
×
×
  • 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.