Jump to content

xtopolis

Members
  • Posts

    1,422
  • Joined

Everything posted by xtopolis

  1. You'll have to find that ">" separator and change it to < That "link" you posted is not something we can see, so we can't help you. That is a local path on your server.. You'll have to show us more (relevant) code, or find the right section that shows that separator.. not much we can do.
  2. Store it in a database: http://www.tizag.com/mysqlTutorial/
  3. http://www.tizag.com/phpT/fileupload.php http://www.tizag.com/mysqlTutorial/
  4. What about this? rename See the example
  5. Would something like this work? SELECT el.`loc`,dee.`pid`,dee.`rating`,dee.`thedate` FROM `lunch_locations` el JOIN `lunch_data` dee ON el.`id`=dee.`pid` WHERE MONTH(`thedate`)= MONTH(CURDATE()) AND DAY(`thedate`) = DAY(CURDATE()) SELECT ... WHERE ... (the Month and Day matches the current Month and Day) ?
  6. Hi, After some googling I found this to work, however, I did not thoroughly test it. (Source: Comment #2) INSERT INTO person_interests( person_id, interest_id ) SELECT p.person_id, i.interest_id FROM persons p, interests i WHERE p.person_id = 42
  7. Typically you make the <TH> clickable with the link being something like somepage.php?sortby=(nameofelement)&dir=asc Where (nameofelement) could be phone, first name, email... etc.. the names of your columns. The dir would be something that changes based on the previous state (toggle). You would then pick them up on the page and check the link before running the query. Is this a PHP or MySQL question? You posted not enough of either.
  8. your buttons move when hovered :S
  9. You'll have to repost what you currently have, but I remember thinking that the problem was that your query didn't have quotes around the values: Yours: $update = mysql_query("UPDATE nav SET linkname = " . $_GET['linkname'] . " , url = " . $_GET['url'] . " WHERE id = " . $_GET['id'] . ";"); Suggested: $update = mysql_query("UPDATE nav SET linkname = '" . $_GET['linkname'] . "' , url = '" . $_GET['url'] . "' WHERE id = " . $_GET['id'] . ";"); (Though $_GET['id'] should be sanitized by doing something like: $_GET['id'] = intval($_GET['id']); somewhere above
  10. Been busy, Where are you at on this? As for the php example, it would simply be -break down the images based on category (Chobits, AMG, etc) into separate folders -scrape the directory based on the choice -create a random array in php to echo as a javascript array -javascript takes over from there If you are still having trouble with Javascript for this, post what you have now and I can try to look at it.
  11. Hi, Sorry for the delay, I've been busy. Nothing can be completely avoided, necessity is the mother of invention. Eventually someone will find a way if it's valuable enough to them. My recommendations are: +randomize the name of the field, store it in the session so that it's harder to scrape (source code) +use flash instead for it +have dummy buttons that change the page or do something weird The "click the blue triangle" thing I've suggested is just another variation of captcha IMO. I do not know of any examples off hand, but it reminds me a joke screenshot of a russian captcha asking the user to solve a math problem, displayed as an image. Really, you're just trying to avoid the standard ways of verifying that most people are accustomed to [breaking]. Your concern is that your methods do not become more of a hindrance to legit users, while trying to deter the cheaters.
  12. Not really. There are macro programs out there that use VB scripts to locate images and click, so even moving the button around may not be sufficient. All you can really do is make it inconvenient to setup a macro for clicking... such as making the button shape/size/color/text/position random per page load, as well as making sure that clicks only come from your website. (So they don't make their own form that mimics yours, negating your "clickproofing". Perhaps if you could make it a Q/A system. Have it state the thing like: "click on the blue triangle" and have 3 images , 2 of them triangles, 1 being blue, etc. Also be sure to change the wording around. It really comes down to making it inconvenient to map out the possible answers, while still making it easy for a human to decipher and click.
  13. Where does it stop? What is the error / not working part? At a glance, a problem might arise: if(xmlhttp.responseText > "0"){ at that line. You may want to convert the responseText to an integer, and then use > 0 rather than > "0"; Be more specific about what part doesn't work in order to save us time. $username = $_REQUEST['username']; Also you may want to sanitize your inputs (mysql_esape_real_string)
  14. Did you even try my code? I was attempting that with this section: while($row_banner4 = mysql_fetch_assoc($banner4)) { $banners[] = '<a href="http://www.mysite..com/click.php?id=' . $row_banner4['link'] . '" target="_blank"><img src="/images/banners/' . $row_banner4['banner1'] .'" alt="' . $row_banner4['cliente'] . '" border="0" /></a>'; } As well as 1-2 modifications elsewhere.
  15. I am not exactly sure of what you're doing, so I can only speculate. You should not however store data in mysql in the "CSV" type format (you used space delimited instead of comma). It depends on how categories and subcategories correlate I think, but what you have is a better breakdown than your current storage format. I'm having a hard time focusing, but I would think that a category would have certain subcategories, rather than a location having separate subcategories. To start you off, a sample JOIN would be: SELECT L.Name FROM location L JOIN location_categories LC ON(L.ID = LC.Location_id) WHERE LC.category_id = 7 You can further join once you determine the subcategory setup.
  16. This is the basics of Ajax. You can do it the lazy/common way and make the .innerHTML of the <div> contain the new data, or the proper way (creating DOM elements). One of the key things of Ajax is only asking for the data you want to update and using javascript to manipulate the existing content with the new content. Google some basic Ajax (or JQuery ajax) tutorials and you will soon see how easy it is.
  17. Are you comfortable with XML then? You could create a data document and store the meta data regarding public/private that way.
  18. First, you shouldn't have this problem, it seems your database isn't properly normalized: http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html Secondly, you could use stristr to search for a string in a string. foreach ($pieces as $subcat) { if(stristr($subcat, '9')) { echo 'Found a 9.'; } } Or perhaps in_array. if ( in_array('9', $pieces) ) { echo 'I found a 9.'; } Didn't test these as your database data should be handled differently if possible.
  19. <?php require_once('../../admin/Connections/red.php'); mysql_select_db($database_red, $red); $banners = array(); $query_banner4 = "SELECT * FROM banners WHERE status = 1 AND position = 4 AND CURDATE() < termino"; $banner4 = mysql_query($query_banner4, $red) or die(mysql_error()); // $row_banner4 = mysql_fetch_assoc($banner4); $totalRows_banner4 = mysql_num_rows($banner4); // an array of banners while($row_banner4 = mysql_fetch_assoc($banner4)) { $banners[] = '<a href="http://www.mysite..com/click.php?id=' . $row_banner4['link'] . '" target="_blank"><img src="/images/banners/' . $row_banner4['banner1'] .'" alt="' . $row_banner4['cliente'] . '" border="0" /></a>'; } // pick a random one // you could probably use shuffle() here; $html = $banners[array_rand($banners)]; // send XML headers header('Content-type: text/xml'); echo '<?xml version="1.0" ?>'; ?> // print the XML response <banner> <content><?php echo htmlentities($html); ?></content> <reload>5000</reload> </banner> ?> Something like this? shuffle for the array_rand part.
  20. So this code makes some assumptions: +The tables are properly setup (id and manu are of same type) +name is the first column, and picture is the second column returned in the result set +I didn't make any errors (i remembered how to use list() = mysql_.. correctly) <?php $id = ( isset($_GET['id']) ) ? intval($_GET['id']) : 1; mysql_connect("website","username","password"); mysql_select_db("database"); $query = "SELECT m.*, i.* FROM Manuers m JOIN Items i ON(m.id = i.manu) WHERE m.id = $id"; $result = mysql_query($query); while( list($name,$pic) = mysql_fetch_array($result) ) { echo "$name - $picture"; echo "<br />"; } ?> If no id is sent to the page, it will default to 1. Try it, and if it works, we can refine it from there.
  21. Well, from what I can tell, you just need to use these values from your existing script, and apply the CSS as wanted. echo "<a href='http://".$config_value."/forums/viewforum.php?f=".$forum_id."' target='_blank'>".$row2[forum_name].":</a><br>By: ".$topic_last_poster_name."<br>".$date."<br><br>\n";
  22. You are not sanitizing your input which is very bad. Also, I am not certain, but your values in the query should be surrounded by single quotes ' unless they are numeric. edit: ok, maybe secure() is doing something, but why not use the friendly vars $url, $sitename instead of $_GET['url'], etc.?
  23. This was the first thing that came to mind google
  24. You are not using the function correctly. The argument passed to the function is the name of the object trying to be instantiated.
  25. Think about your target audience and supported resolutions. It is very rare a site will look perfect in every scenario. % widths can be tricky, especially using CSS alone. I suggest you consider what target resolution(s) you want to aim for and cater to those first. If you want to try to handle all things, you could later use javascript to detect the screensize and change the stylesheet appropriately. It would be extra work however.
×
×
  • 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.