Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. almost class soccer { function roffle_lol($tevez) { $this->$tevez; return $tevez; } } $lol = "TEVEZZZ!"; $soc = new soccer; $result = $soc->roffle_lol($lol) echo($result);
  2. in addition to Barand corrections i think its important to point out that for a counter (like a site counter) your need to store the data somewhere ie file/database as your starting i would suggest a file heres a very basic read and write (i'll leave you to workout how to join them up) fwrite fread
  3. $user['auth'] wasn't passed to the function try function displayLogin($user) if that makes sense
  4. i think you mean addslashes or htmlspecialchars if not try them
  5. 2 options spring to mind strpos & substr or RegEx (ie preg_grep) Edit: fixed preg-grep link
  6. LOL, ok to sum up, it depends on the scale of the database
  7. your IP check is ok or can't be done side 1 try \t side 2 try strlen("hello");
  8. you might want to read up on indexing In general, when you want to make a slow SELECT ... WHERE query faster, the first thing to check is whether you can add an index. All references between different tables should usually be done with indexes.
  9. no worries, but clicking solved would of been nice....
  10. LOL click solved if it is working happens to the best of us
  11. what your looking for Doesn't exist, the closest your get is the MAC address (serial number of the network card) but they can be spoofed!
  12. i wanted to see if the data was being posted as <h5>Bungie Weekly Update </h5> or <h5>Bungie Weekly Update </h5> addslashes shouldn't do that OK combo time in addition to what you have. use html_entity_decode($fromDB); this WILL translate to html
  13. remove //Checking required fields foreach($req as $checkq) { if (empty($_POST[$checkq])) error_handler('<h2>Error</h2>' . $error_required); } //endforeach as its doesn't seam to be in use anyways
  14. can you do the following and post the results please echo "<pre>"; print_r($_POST);
  15. as i assumed you had blogs and you don't i have to move to Andy B side (if the tables are almost exact ie both alway have the same number of records etc and one isn't being used for a massive data hold)
  16. Hummm it should reverse the effect!! try using addslashes & stripslashes //to DB $content = addslashes ($_POST['news']); //from DB stripslashes($_POST['news']) = $content;
  17. other options to look at are addslashes & stripslashes
  18. when inserting remember the quotes and slashes can messs things up, myphpadmin fixes a few of these to reverse use $_POST['news'] = htmlspecialchars_decode($content, ENT_QUOTES); well maybe not $_POST['news'] = lol
  19. try $content = htmlspecialchars($_POST['news'], ENT_QUOTES);
  20. basically neel_basu is saying do it outside the mysql request,
  21. looks ok, have you tried it ?
  22. whats wrong with the cookie creation ? nm.. i give!
  23. INSERT = NEW UPDATE = erm.. well UPDATE and existing one and the WHERE needs to have operators!! what are you trying to do ? WHERE datestamp='2007-04-28', ID='vtc2av' this datestamp='2007-04-28' AND ID='vtc2av' or datestamp='2007-04-28' OR ID='vtc2av' what!!!
  24. OK but your question was so Step #1 set the cookie, Step #2 use file_get_contents() "to parsing a dynamic page which requires cookie info to display properly" as its on another domain, that domain will have to create the cookie,
  25. so something like this <?php // How many images to span across the page before they go on to the next $maxItemsPerRow = 5; $StartRow = 0; $rating = mysql_query("SELECT * FROM ratings WHERE which_user = '{$profile_info['username']}' ORDER BY total_votes DESC LIMIT $StartRow,$maxItemsPerRow") or die(mysql_error()); if(mysql_num_rows($rating) > 0) //create a loop, because there are rows in the DB ?> <table border="0" cellpadding="1" cellspacing="0"> <tr> // Insert row break </tr><tr> <?php while($row = mysql_fetch_assoc($rating)) { echo "<td style=\"font-size: 7pt; font-family:Verdana, Arial, Helvetica, sans-serif; \"> <a href=\"javascript:poptastic('view_art.php?member_id=$row[which_id]');\"><img src=\"$row[tpath]\" /></a> </td>"; } ?>
×
×
  • 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.