Jump to content

ialsoagree

Members
  • Posts

    406
  • Joined

  • Last visited

Everything posted by ialsoagree

  1. The object method access operator "->" shouldn't be the problem as it's interpreted by the PHP parser (HTML is interpreted by the browser, and the browser doesn't get any information to interpret until the server has sent it a response, which is after the PHP parser gets to do it's thing). Instead, your problem is probably within one of your functions (either how the output is being prepared, or how it's being written to the browser). You should check your method here: $easyconvert->output_all(); As well as how your output is being prepared.
  2. You're missing a parenthesis: if ( ($x > 0) && (strlen($y) == (32)) ) {
  3. Try changing: else { print "\t</form>\n"; } to: print "\t</form>\n";
  4. Need to see how you've changed the code.
  5. As to your first problem: $getbuild = $_GET['build']; But you define the name of the select as "bundle" - not build: echo "<select name='bundle' ... The browser will only submit form values for the form that was told to submit. You can keep everything in the same form by altering your if statements by adding an "else" clause: if (isset($getcodeline)){ .... } else { print "\t</form>\n"; } Then you need to delete all your "print "\t</form>\n";" where they appear currently (except in the last if statement), and remove the "print "\t<form id='sort'>\n";" within the if statements.
  6. I don't see how your while loop check can ever fail, you have no way of stopping the loop that I saw... while ($matrioshka_tipo = enum_select("opera","opera_tipo")){ // $matrioshka_tipo can always have enum_select assigned to, the loop never ends!
  7. Your quotes appear to be pretty messed up, you might want to have a look: "update `users` set `hp` = IF((hp + (maxhp + 3))<maxhp, (hp + (maxhp + 3)), maxhp)" where array($row['id]))
  8. As the above poster, you forgot the colon after Location. For javascript, location.href returns the current url, it doesn't let you change it: <!-- window.location.assign("http://www.icameradb.com") //-->
  9. This isn't a small task, if you're not comfortable building something like this on your own, then finding a package solution would be a better option. phpBB is free, but it's forum hosting software, similar to the forums phpfreaks use (although not the same). phpBB has a free mod called phpBB Portal, but I'm not sure if it possesses the feature you've described. In any event, your feature requires user to be able to register and login, and votes and comments to be stored and related to topic posts. All in all, this is quite a bit of work to start from scratch. Using a solution, such as phpBB and phpBB Portal, even if it didn't solve your problem outright, would give you the foundation to add in the features you want without having to build an entire system. But phpBB is not the only solution out there either. It is a free solution, but you may be able to find other free solutions or other commercial solutions that more directly solve your problem.
  10. $videotitle_array = mysql_fetch_assoc($videotitle); $videotitle = $videotitle_array['videotitle'];
  11. Alright, now I'm a bit confused as to what you're asking. You say starting an ending points, as in, making a rectangle correct? And you want anything that is at least partly inside that rectangle to display, correct? And the rows you're looking for are themselves rectangles, correct? If so, you need to change the AND's to OR's and remove the = signs (otherwise, rows that simply share a border, but whose area isn't actually in the display will also get pulled). If not, you need to more clearly explain the problem.
  12. I'd recommend not making your own. There's a number of forum solutions already available, some of which are free, there doesn't seem to be a big reason to reinvent the wheel. It will probably be less work to add features that you like to an existing forum, then to build your own forum and include those features in it. I'd recommend phpBB forums, as a free forum solution with a large modding community.
  13. As suggested above, use the same SQL using OR's instead of AND's. You'll also want to remove the ='s, unless you want rows that share a border (but no area) to be returned too.
  14. That is because all that code is on one php page. It doesn't matter if the code is all on one page, once it goes to the browser, the browser doesn't know what to do when the form submits if there's no form action or form method. You still need to do what leehanken suggests: <form name='form1' action='myscript.php' method='post'>
  15. Do the rows in the database have to be fully within the viewing area to be returned, or are they returned if any part of their area should be displayed? For the former (only show objects fully within the area), and assuming your columns are ints: $query = "SELECT * FROM coordinates_table WHERE startx <= $startx AND starty <= $starty AND endx >= $endx AND endy >= $endy"; To do the 2nd option, show every object that at least partially appears in the viewing area, then change the AND's to OR's (you may also want to remove the ='s from all the segments. This prevents a row that appears on the edge of the view or on the corner of the view - in other words, sharing a side but no area - from being displayed). Edit: few corrections to the SQL.
  16. Your update is inside the loop with the same "WHERE" criteria everytime the loop runs. So when you use print, you'll see each $im result get printed to the browser, but everytime your SQL runs, the same row (or rows) are getting updated with the new information, and all the old information is lost. In other words, this code below gives you the same result as your current code: foreach ($html->find('[class=md_mu]') as $element) { $im = $element->innertext; print $im . "<br />"; $fileExtension = substr(strrchr($im, '.'), 0); $fileExtension = strtolower($fileExtension); $replacedName = str_replace(" ", "-", $searchString); $newFileName = "$replacedName-" . time() . "$fileExtension"; $content = file_get_contents($im); $fp = fopen("../imgProducts/img-fs/$newFileName", "w"); fwrite($fp, $content); fclose($fp); } $q = mysql_query("UPDATE `fcs_products` SET `product_fullsize`='$newFileName' WHERE `product_root_keyword`='$searchString'");
  17. Also just noticed, your 2nd query should look like this: $addresses = db_fetch_object(db_query('SELECT `house`, `apt`, `name` FROM {terr_master} AS m WHERE tid = 130 AND street = \'Flatbush\' ORDER BY m.house ASC')); You need to escape the slashes for the street or you're telling PHP to end the string early. Surprised this didn't result in a PHP parse error?
  18. What you're trying to accomplish isn't exactly clear (or perhaps just not to me). If you're trying to get a variable that has the database resource attached to it you can access from anywhere, then your method won't work because you're not saving the database resource to a variable: mysql_connect(DB_HOST, DB_USER, DB_PASS); If you're just trying to create access to the database in the global scope, mysql_connect() does that no matter where it is called, this method is a lot of work when simply calling mysql_connect will do the same thing. Or perhaps I'm missing something...
  19. The problem is that you get a street and build a loop around it: $result = db_query('SELECT street FROM {terr_master} AS m WHERE tid = 130 GROUP BY m.street ORDER BY m.street ASC'); while($data = db_fetch_object($result)) { But when you get the individual addresses, you don't loop through the results: $addresses = db_fetch_object(db_query('SELECT `house`, `apt`, `name` FROM {terr_master} AS m WHERE tid = 130 AND street = 'Flatbush' ORDER BY m.house ASC')); $page_content .= '<p>' . $streets . '<br/>'; $page_content .= $addresses->house . ' ' . $addresses->apt .' ' . $addresses->name; You need to loop through the addresses too.
  20. Without more specific information on how your data is organized and being gathered, we can't give you a specific solution. In general though, you need to start a loop when you have all the information you need accessible. If you're getting info from a mysql database, this might be using a while loop and doing $row = mysql_fetch_assoc($result) or something similar. Whatever the case, use my previous strategy to build each div 1 at a time, store them in an array, and when you need to echo them/write them to the browser, you have them ready to go.
  21. It really helps when code is enclosed in PHP or CODE bb tags... http://www.phpfreaks.com/page/rules-and-terms-of-service#toc_forum_guidelines Your problem is with your form: <form method="post" name="avsab"> You need an action attribute equal to the PHP script you want to run. <form method="post" name="asvab" action="your_php_file_name.php"> I haven't checked your code for any other errors.
  22. Just a quick aside, since I can't edit my post, it would probably be a good idea to initialized the array before you start using it, so before the loop... $radio_button = array();
  23. $keys = array_keys($fplan); foreach ($keys as $key) { $radio_button[$key] = '<input type="radio" name="plan" value="', $key, '">'; } $radio_button[product_id] where product_id is the id of the product you want to get the radio button for will have the radio button HTML.
  24. Yes, this change should only be run once. Either create a unique PHP file to run it, or run it on the command line when connected to MySQL or through software that manages a MySQL database like phpMyAdmin or GUI software that allows you to run SQL on the database.
  25. This isn't something you can do with PHP, this is a javascript issue. <script type="text/javascript"> function change_div_text(text) { document.getElementById('showtext').innerHTML = text; } </script> <img onmouseover="change_div_text('Some text here')" onmouseout="change_div_text('')" src="images/image1.jpg" width="25" height="25" alt="image1" name="image1" id="image1" > <img onmouseover="change_div_text('Other text here')" onmouseout="change_div_text('')" src="images/image2.jpg" width="25" height="25" alt="image2" name="image2" id="image2" > etc.
×
×
  • 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.